[Top][All Lists]

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

Re: right-char and left-char

From: Eli Zaretskii
Subject: Re: right-char and left-char
Date: Thu, 06 Oct 2011 20:21:15 +0200

> From: Chong Yidong <address@hidden>
> Date: Thu, 06 Oct 2011 12:45:16 -0400
> In the Emacs manual, the documentation for right-char says:
> `<right>'
>      Move one character to the right (`right-char').  This moves one
>      character forward in text that is read in the usual left-to-right
>      direction, but one character _backward_ if the text is read
>      right-to-left, as needed for right-to-left scripts such as Arabic.
> But in fact, the directionality of right-char and left-char depends on
> current-bidi-paragraph-direction.  If you have RTL text embedded in LTR
> paragraphs, like in the HELLO file, <right> moves left while in the RTL
> segment.  This contradicts the manual description, which merely states
> "if the text is read right-to-left".
> Which is the intended behavior?

The intended behavior is what you see now in Emacs.  The manual is
correct for the important special case of the paragraph direction that
coincides with the text direction.  Most L2R text in the world is in
L2R paragraphs and most R2L text is in R2L paragraphs, so the
description covers most of the use cases.

As for the less common use case you mention, yes, the description in
the manual could mislead if read too literally; "text is read
left-to-right" is intentionally vague to at least not be blatantly

There was a long thread about this which started here:


In that thread, I explained the difficulties of describing the
behavior clearly and concisely to someone who doesn't already know
what is the expected behavior.  (Basically, only users of R2L scripts
will know what to expect.)  If you can come up with a better (more
accurate) description, please suggest it.  I don't think referencing
current-bidi-paragraph-direction is the way to do it, because it
sounds wrong to describe such a simple and basic editing key through
such a complex notion as base paragraph direction or by reference to
an obscure internal function.

reply via email to

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