emacs-devel
[Top][All Lists]
Advanced

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

Re: Handling invisible text in bidirectional display


From: David Kastrup
Subject: Re: Handling invisible text in bidirectional display
Date: Sun, 17 Jan 2010 21:17:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Here's an example.  Suppose the buffer contains this text:
>
>   ABCD(4+5)*3
>
> (As usual, capital letters are strong right-to-left characters.)  This
> text will be displayed as
>
>   3*(5+4)DCBA
>
> By contrast, the same text with `+' removed will display as
>
>   3*(45)DCBA
>
> As you see, 4 and 5 switched their visual order.  This means that if
> we first remove the invisible characters and then reorder, the 4 and 5
> will appear in a different order when `+' is invisible than when it is
> visible.  With my suggestion, we _first_ reorder and _then_ hide
> invisible characters, so the display with `+' invisible will be
>
>   3*(54)DCBA
>
> which I think is less surprising.

I disagree, because there is no reason for 5 and 4 to switch their order
anymore.

There also is a difference between invisibility and display properties
here: if there is a display property on a letter "x", it is hard to see
why several consecutive images should be reordered to be L->R.  Of
course, one should argue that in the presence of L->R, people should
take care to use the right "shadowed" character to match the intended
left/rightness of the image.  But I think that is not really sane.  If
we want display property material to have an explicit direction, it
should be set with properties, not by some magic derivation from the
underlying invisible text.

-- 
David Kastrup





reply via email to

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