Re: Callbacks?

Martin Duerst <[email protected]>
Newsgroups gmane.emacs.bidi
Message-ID <6.0.0.20.2.20051130160514.039782a0@localhost>
At 19:32 05/11/29, Gregg Reynolds wrote:
 >Martin Duerst wrote:
 >> Hello Greg,
 >> At 01:59 05/11/29, Gregg Reynolds wrote:

 >>  >An implementation technique I'd like to see is to simply use 
background color to indicate which weakly-directional characters in a bidi 
string have been reordered by the algorithm.
 >> This seems like an useful idea to start with. But how exactly would
 >> you define "weakly-directional characters that have been reordered"?
 >> At first sight, reordering is not a property of individual characters.
 >>
 >But we know that weakly-directional characters can be interpreted either 
way, depending on context, so they represent ambiguity.  The bidi algorithm 
has to decide how to treat them, no?  E.g. with something like
 >
 >  'he said "OLLEH!" to the world'
 >
 >can we conclude that the implementation decided ! should be treated as an 
LTR char following an RTL string?  If so, then we have four categories (4 
background hues? ;): strong LTR, strong RTL, weak interpreted as LTR, weak 
interpreted as RTL.

Ah, okay, that would make sense. If you had written "indicate in which
way (as which direction) weak characters have been reordered", I'd
probably have understood earlier.

 >I'm not even sure it would in all cases.  I've seen some very wierd 
reordering involving XML with mixed English and Arabic; I don't think I 
could ever figure out why it ended up that way, and if I try to fix it up - 
well, IMHO the bidi algorithm does great violence to the Principle of Least 
Surprise.  My solution in that case is very simple:  use a transparent 
(RTL-enabled, non-reordering) editor.  Vim works great; use RTL mode for 
the Arabic text, and LTR mode for the English.  It's quite efficient for 
XML editing, in fact.  (Hence my ardent desire for an option to turn off 
bidi reordering in Emacs.)
 >
 >> for a large number of people, and we are trying to do better
 >> than that.
 >>
 >I'll have to read your paper more carefully.  Seems to me that, once one 
decides to use the bidi algorithm one has no choice but to suffer the 
consequences.

Some of the consequences, definitely. We try to minimize it :-).

Regards,   Martin.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.