> From: Kenichi Handa <handa@m17n...>
> Cc: emacs-bidi@gnu.... > 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
... 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.