Emacs & Hebrew
Eli Zaretskii
eliz at gnu.org
Thu Jun 14 06:02:44 IDT 2012
> From: Omer Zak <w1 at zak.co.il>
> Date: Wed, 13 Jun 2012 19:33:29 +0300
>
> > > So when one wants to view BiDi text in visual order (the usual case),
> > > one opens the file in Gedit. And when one wants to see it in logical
> > > order (e.g. to figure out how the visual order turned out to be so
> > > messed up), one opened it in Emacs.
> >
> > Suppose the visual order is never "messed up" in Emacs -- do you still
> > need this switch?
>
> YES. The Unicode BiDi algorithm is not perfect and it sometimes messes
> up the visual order of BiDi strings. The BiDi algorithm implementation
> in Emacs must follow the Unicode standard. Hence, it is inevitable that
> there'll be some cases, in which the visual order is messed up in Emacs.
> In fact, not to be messed up in those pathological cases would actually
> be a bug in Emacs' BiDi algorithm implementation.
It remains to be seen whether these cases should not have a better
solution than to turn off reordering. You didn't give any practical
examples, so it's hard to reason about that.
In any case, just to see the logical sequence, it is enough to move
the cursor, since cursor moves in logical order in Emacs.
> > > Another use case is by blind computer users, who prefer to use Braille.
> > > All BiDi Braille text must be laid out in logical order. So even if
> > > your editor supports Hebrew Braille fonts, they are of no use if the
> > > text is - too helpfully - printed out in visual order.
> >
> > I don't know enough about this, but isn't Hebrew Braille just an
> > encoding of Hebrew letters using Braille characters? If so, then
> > Braille characters all have string left-to-right directionality, and
> > therefore will not be reordered for display by Emacs.
>
> No. The same standard encoding is used. Braille is just another font.
Too bad. Using fonts to change semantics is a bad idea.
In any case, this situation should have an automatic solution in
Emacs. If someone reports enough details about it, a specialized
feature can be developed.
> To do otherwise would render regular Hebrew text inaccessible to the
> Hebrew speaking blind computer users.
> This font, however, needs to be rendered by bypassing the BiDi
> algorithm.
Bypassing reordering does not mean turn it off. Emacs should do that
automatically.
> > But even if the above does not solve the issue, I would expect people
> > to request that Emacs does TRT by default with Hebrew Braille, rather
> > than turning bidi off.
>
> What does TRT stand for?
The Right Thing.
> Turning BiDi off would be a satisfactory solution in this use case.
It's a kludge. That variable exists for debugging and as a stop-gap
for situations that are currently not supported yet. It should not be
built upon as _the_ solution. Reporting the situations that need it
actively will go a long way towards making sure Emacs's support for
bidi is better.
More information about the Linux-il
mailing list