From: Eli Zaretskii <eliz@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: right-char and left-char
Date: Thu, 06 Oct 2011 20:21:15 +0200 [thread overview]
Message-ID: <83pqiagew4.fsf@gnu.org> (raw)
In-Reply-To: <87k48it6g3.fsf@stupidchicken.com>
> From: Chong Yidong <cyd@stupidchicken.com>
> 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
wrong.
There was a long thread about this which started here:
http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00005.html
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.
next prev parent reply other threads:[~2011-10-06 18:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 16:45 right-char and left-char Chong Yidong
2011-10-06 18:21 ` Eli Zaretskii [this message]
2011-10-06 22:04 ` Chong Yidong
2011-10-06 22:45 ` Drew Adams
2011-10-07 12:37 ` Eli Zaretskii
2011-10-07 1:49 ` Stefan Monnier
2011-10-07 12:16 ` Eli Zaretskii
2011-10-07 12:04 ` Eli Zaretskii
2011-10-06 22:20 ` Chong Yidong
2011-10-07 12:08 ` Eli Zaretskii
2011-10-07 15:57 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83pqiagew4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.