Subject: Re: bug#9571: 24.0.50; user option to turn off bidi, please

From: Eli Zaretskii <[email-masked]>
Date: Fri, 23 Sep 2011 23:09:49 +0300

> Date: Fri, 23 Sep 2011 15:44:34 -0400
> From: Richard Stallman <[email-masked]>
> CC: [email-masked], [email-masked]
> 
>     What confusion are you referring to?
> 
> Not being sure about the order, in the buffer, of the characters you see
> on the screen.

If you need to see the buffer order, moving with C-f and C-b will show
you the order in the buffer, because cursor motion still works in
buffer order.

> 					  Are we talking about a buffer
>     with or without R2L characters?
> 
> It would have to be a case where characters that have bidi
> significance are present.

If the reordering is correct, there could be no confusion, because the
text is then legible.  If it is illegible, then there's a bug that
needs to be reported.

For example, if there are no R2L characters in the text, the result of
reordering should be identical to not reordering at all.  Any person
who can read whatever language we are talking about will instantly
distinguish between correct and incorrect order.  I see no place for
any confusion here.

Users will gain nothing from this option, because turning off
reordering when R2L text is involved does not make the text more
legible; quite the opposite.

I explained in my other messages what will users lose if they have
such an option, unless someone invests a non-trivial amount of work to
restore the old code where I deleted or rewrote it, and maintain that
code as a separate execution branch for years to come.

>                 If there are [no R2L characters], there is no
> reordering, thus no possibility it can cause confusion.

You are wrong: _all_ characters are displayed in Emacs 24 via the
reordering engine.  It's just that plain left-to-right text emerges
from that reordering in its original buffer order.  But the reordering
engine doesn't "know" that, it just implements the rules of
reordering.

> 				     And how would setting
>     bidi-display-reordering to nil resolve that confusion?
> 
> You would see all the characters in the order that they
> appear in the buffer.

That will not resolve any confusion.  As someone who happened to read
R2L text in Emacs 23 (e.g., in email messages), I can assure you:
seeing R2L text in buffer order confuses even more than seeing results
of slightly incorrect reordering.  It makes the reading process very
slow and error prone, even if your command of the language is very
good.

> I don't envision anyone would want to edit this way.  But it could be
> useful to look at this kind of display once in a while.

It's not useful for users, believe me.  It could be useful to someone
who debugs Emacs display, but there's no need for user option for
that use case.

>     Because the unidirectional display will one day go away, and having a
>     user option will be an obstacle to getting rid of it.
> 
> Why should it ever be deleted?  What is gained by deleting it?

Easier maintenance.  Emacs display engine is already more complex that
humanly perceptible.  Having two divergent engines in one means
unnecessarily complicating maintenance and slowing down development,
because every change needs to be tested twice and every new feature
needs to be designed so it works in both modes.  I'm quite sure doing
this will be a waste of resources which are already at premium.
There's no need for the old unidirectional display code; as I
explained above, straight left-to-right text is treated by the
bidirectional code correctly and transparently to the users.