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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 24 Sep 2011 17:13:40 +0300

> Date: Sat, 24 Sep 2011 08:28:39 -0400
> From: Richard Stallman <[email-masked]>
> CC: [email-masked], [email-masked]
> 
> Would this change in bidi_get_type suffice to implement non-bidi
> display?  (In addition, one needs to define the option
> display-bidi-flag, etc.)
> [...]
> +   if (NILP (Vdisplay_bidi_flag))
> +     return default_type;
> + 

No, this won't do what you want.  default_type comes from this code:

  default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch));

This accesses the table of bidirectional properties and extracts from
there the bidirectional type of CH, the character we are interested
in.  The rest of the code deals with _overriding_ that type.  For any
R2L character, default_type is STRONG_R, and it will cause bidi.c to
reorder it into visual order.

What you want is to pretend that R2L characters get the type STRONG_L,
which is the type reserved for letters in left-to-right scripts.

But simply overwriting default_type with STRONG_L isn't right, either.
That's because as long as we run the code in bidi.c unaltered, there
are some characters whose bidirectional properties are still needed
for the code to work: newlines, paragraph separators, line separators,
and a few others.

So my suggestion to have what you want is different, see my other
mail.

> If it is really as easy as this, why say no?

I didn't say no to this suggestion, because it was never explicitly
requested, from my POV.  If you meant this from the beginning, then
I'm sorry for my misunderstanding of what you meant.

However, I'm quite sure I did understand the original request that
started this, and it wasn't this.