emacs-bidi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-bidi] Treatment of LRE,RLE,LRO,RLO,PDF,LRM,RLM


From: Eli Zaretskii
Subject: Re: [emacs-bidi] Treatment of LRE,RLE,LRO,RLO,PDF,LRM,RLM
Date: Wed, 18 Aug 2010 06:37:28 -0400

> From: Kenichi Handa <address@hidden>
> Cc: address@hidden
> Date: Wed, 18 Aug 2010 16:53:27 +0900
> 
> > > For instance, if you have this text:
> > >   r2l contents is embeded here [RLE] R2L CONTENTS [PDF].
> > > the current bidi code generates glyphs in this visual order:
> > >    ... here [PDF] STNETNOC L2R [RLE].
> 
> > Yes, this is intentional: when these formatting characters are
> > revealed, they should enclose the text they affect.
> 
> There is another way to enclose the text:
> 
>     ... here [RLE] STNETNOC L2R [PDF].

We could do that if it would help.  But since we have now decided not
to use auto-compositions for this, I guess this is a moot point.

For the record, I used the former method because I consider the
formatting characters part of the embedding.

> I don't know which is good.  Does the current code conform
> to "5.2 Retaining Format Codes" of UAX#9?

UAX#9 is totally silent regarding the _display_ of the formatting
characters.  If you just go by the book, you will reorder the above
text as

    ... here STNETNOC L2R [RLE] [PDF].

because RLE has the same level as the embedding, while PDF has the
level of the outer text.  That is why bidi.c artificially enlarges the
level of PDF to make it part of the embedding.  You will see a comment
about this near the end of bidi.c:bidi_level_of_next_char.

> > OK, I'm convinced.  Let's go with the hide mode instead.  I hope the
> > need for one more C-f/C-b will not be confusing.  Maybe we should
> > modify cursor motion commands to automatically move past these
> > characters?  What do other application do, for example OpenOffice?
> 
> In OpenOffice (3.2), we must type Left key twice to move
> past one formatting characters.  Gedit is the same.

Then I guess we are in good company.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]