TAKAHASHI Naoto | 2 Jul 03:26

Re: Emacs for Arabic

John Plaice writes:

> how long until 21.2 support?

Depends on Handa's available time.  Unfortunately, we are very busy
until the end of July.

--

-- 
TAKAHASHI Naoto
ntakahas <at> m17n.org
http://www.m17n.org/ntakahas/
Nadim Shaikli | 3 Jul 01:48
Picon
Favicon

Re: Emacs for Arabic

Takahashi-san, first and foremost thank you again for your help and
interest in Arabic and the various issues there-in.  A couple of
things;

1. I'm attaching a very simple patch against what's currently hanging
   of the FTP site that makes some minor modifications and corrects
   a couple of encodings - do please apply it.

2. Regarding the "simplified" Bidi, could I suggest the following
   rather simple addition.  Pseudo-code would get the point across
   simpler.

     if ( first_char_is_RTL )
       Assume entire line is Right-To-Left
     else
       /* default */
       Assume entire line is Left-To-Right

     first_char_is_RTL
       {
          /* Look at the first character within a line to see and
             note its encoding, skip all punctuations (ie. '-', '+',
             '*', etc)
           */
          if (first_char is punctuation )
            first_char = get_next_char;

          if (
	      (first_char <= 0x060C && first_char >= 0x0670)  ||
              (first_char <= 0xfe70 && ...)
(Continue reading)

Tzafrir Cohen | 3 Jul 18:40
Picon
Favicon

Re: Emacs for Arabic

On Tue, 2 Jul 2002, Nadim Shaikli wrote:

> Takahashi-san, first and foremost thank you again for your help and
> interest in Arabic and the various issues there-in.A couple of
> things;
>
> 1. I'm attaching a very simple patch against what's currently hanging
>  of the FTP site that makes some minor modifications and corrects
>  a couple of encodings - do please apply it.
>
> 2. Regarding the "simplified" Bidi, could I suggest the following
>  rather simple addition.  Pseudo-code would get the point across
>  simpler.
>
>    if ( first_char_is_RTL )
>      Assume entire line is Right-To-Left
>    else
>      /* default */
>      Assume entire line is Left-To-Right

Generally, it would be best to reorder paragraphs rather than lines.
Reordering lines wil give some strange results in case a line in the
middle of a paragraph happens to start with a character of the "other"
directionality (e.g: a number or english letter in the middle of a hebrew
paragraph).

Also note that you should generally scan the {line|paragraph|whatever} for
the first char that has strong "directionality".

--

-- 
(Continue reading)

Nadim Shaikli | 3 Jul 19:01
Picon
Favicon

Re: Emacs for Arabic

--- Tzafrir Cohen wrote:
> On Tue, 2 Jul 2002, Nadim Shaikli wrote:
> 
> > 2. Regarding the "simplified" Bidi, could I suggest the following
> >  rather simple addition.  Pseudo-code would get the point across
> >  simpler.
> >
> >    if ( first_char_is_RTL )
> >      Assume entire line is Right-To-Left
> >    else
> >      /* default */
> >      Assume entire line is Left-To-Right
> 
> Generally, it would be best to reorder paragraphs rather than lines.
> Reordering lines wil give some strange results in case a line in the
> middle of a paragraph happens to start with a character of the "other"
> directionality (e.g: a number or english letter in the middle of a hebrew
> paragraph).
> 
> Also note that you should generally scan the {line|paragraph|whatever} for
> the first char that has strong "directionality".

That would take it outside the realm of simplicity :-)  For what its worth,
personally I'd be willing to live with the "oddity" of have a line within a
paragraph orient itself in the other direction.

My $0.02's worth.

 - Nadim

(Continue reading)

Eli Zaretskii | 3 Jul 06:48
Picon

Re: Emacs for Arabic


On Tue, 2 Jul 2002, Nadim Shaikli wrote:

> 2. Regarding the "simplified" Bidi, could I suggest the following
>    rather simple addition.  Pseudo-code would get the point across
>    simpler.
> 
>      if ( first_char_is_RTL )
>        Assume entire line is Right-To-Left
>      else
>        /* default */
>        Assume entire line is Left-To-Right

I cannot say I like this approach.  In my experience, it yields 
dreadfully wrong results in many practical cases.  (MS-Windows implements 
something very similar.)

> 3. Your comment about "Handa's available time" pertains to modifying
>    the code to upload this to emacs' live CVS ?  In other words, this
>    work/effort will make it to emacs' proper repository, correct ?

The entire approach to the bidi reordering that Handa-san wrote several 
years ago was more or less rejected by Gerd Moellmann, who was very 
unhappy about the way the code caches characters/glyphs before reordering 
them.  Gerd was convinced that this will slow down the display engine to 
an unbearable degree.

That is why Handa-san's code was never added to Emacs, although it exists 
for quite some time now.

(Continue reading)

Nadim Shaikli | 3 Jul 18:40
Picon
Favicon

Re: Emacs for Arabic

--- Eli Zaretskii wrote:
> 
> On Tue, 2 Jul 2002, Nadim Shaikli wrote:
> 
> > 2. Regarding the "simplified" Bidi, could I suggest the following
> >    rather simple addition.  Pseudo-code would get the point across
> >    simpler.
> > 
> >      if ( first_char_is_RTL )
> >        Assume entire line is Right-To-Left
> >      else
> >        /* default */
> >        Assume entire line is Left-To-Right
> 
> I cannot say I like this approach.  In my experience, it yields 
> dreadfully wrong results in many practical cases.  (MS-Windows implements 
> something very similar.)

It certainly wouldn't be perfect, but as a simplified hack/approach it
might serve to be useful.  For the various documents that I'm holding on
to, this approach would serve it very well (my perl hacks note that
at least:-).  It could be yet another "Use first-char BIDI algorithm"
next to the current 3 options under the Bidi menu.

> > 3. Your comment about "Handa's available time" pertains to modifying
> >    the code to upload this to emacs' live CVS ?  In other words, this
> >    work/effort will make it to emacs' proper repository, correct ?
> 
> The entire approach to the bidi reordering that Handa-san wrote several 
> years ago was more or less rejected by Gerd Moellmann, who was very 
(Continue reading)


Gmane