emacs-devel
[Top][All Lists]
Advanced

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

Re: bidi reordering in program source buffers (was: bidi-display-reorder


From: Eli Zaretskii
Subject: Re: bidi reordering in program source buffers (was: bidi-display-reordering is now non-nil by default)
Date: Sat, 20 Aug 2011 13:53:29 +0300

> From: Andreas Schwab <address@hidden>
> Cc: Chong Yidong <address@hidden>,  address@hidden,  address@hidden
> Date: Sat, 20 Aug 2011 11:28:23 +0200
> 
> Eli Zaretskii <address@hidden> writes:
> 
> > And if we reorder it as a single L2R paragraph, we get this:
> >
> >   printf ("FEDCBA %d\n", foo);
> >
> > which is a bit better, but still wrong.
> 
> IMHO this is the correct way to display it.  Consider when adding more
> format directives, you must not reorder them so they still match the
> order of arguments.

Match the order on the screen or in the source file?  The latter is
not changed at all by reordering.  As for the former, any bidi-aware
format string should use directives with the parameter numbers
explicitly specified with the n$ parameter ordinals, so the user
looking at the result on the screen will know the correct order as a
side effect.

In general, having something like this on display:

 printf ("FEDCBA %d PONMLK %f ZYX %lu\n", foo, bar, baz);

for a source that in logical order reads

 printf ("ABCDEF %d KLMNOP %f XYZ %lu\n", foo, bar, baz);

which is what you suggest, is only marginally better than the original
logical-order string, because the reading order is ambiguous at best,
and downright undecipherable in more complex situations, where the
format string includes punctuation and L2R text.  So if we think the
above is acceptable, we might as well consider not reordering this at
all.



reply via email to

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