emacs-devel
[Top][All Lists]
Advanced

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

Re: `C-b' is backward-char, `left' is left-char - why?


From: Eli Zaretskii
Subject: Re: `C-b' is backward-char, `left' is left-char - why?
Date: Sat, 28 May 2011 00:09:31 +0300

> From: "Drew Adams" <address@hidden>
> Date: Fri, 27 May 2011 13:40:37 -0700
> 
> I'm curious. Why is it a good idea that `C-b' and `left' are no longer bound 
> to
> the same command?

Because `left' and `right' behave differently depending on the
bidirectional context, whereas C-f and C-b are independent of it.

> I'm not asking about the difference; I can see that from the doc strings.  I'm
> wondering why we've broken their longstanding correspondence.

Because users of right-to-left scripts expect the current behavior of
the arrow keys.

> Lots of Emacs and Emacs Lisp does things based on which commands are used.  
> It's
> sometimes not enough that two commands behave the same or similarly.  If they
> are different commands then some code will likely not DTRT - some code will at
> least not treat them the same.

If you can suggest a way of catering to expectations of bidi users
without binding differently arrow and keyboard keys to cursor movement
commands, please do.

> Even if the bidi stuff specifies the same behavior for `backward-char' and
> `left-char' whenever there is in fact no bidirectional stuff present

It does.

> Why not make bidi optional?

It _is_ optional: you can set bidi-display-reordering to nil.  (Well,
actually it's nil now, but the plan is to make it t at some point
before Emacs 24 is released.)

> Why not have a minor mode for the bidi stuff

Bidi cannot be a minor mode, because bidi reordering for display
should happen automatically whenever there are right-to-left
characters in a buffer.  Minor modes don't work that way.

Besides, the rest of the world does bidi automatically; it's high time
Emacs does, too.

> only bind keys such as `left' to commands that are specific to bidi when that
> mode is turned on?  Why make such an invasive, top-level change to Emacs?

As I said: if you have practical suggestions (preferably with code),
let's hear them.  I made that change because every other program out
there differentiates the functions bound to these keys, but of course
if there's a better way of doing that in Emacs, I don't have any
dogmas here.

> I understand that bidi is a great addition to Emacs and will be welcomed by
> folks around the world.  I also realize that it is complex to implement.  But
> some of us will rarely, if ever, use it.

Emacs should behave exactly the same as it does without bidi when the
text doesn't include any right-to-left characters.  Anything else is a
bug.  The only reason why the bidi-display-reordering flag will stay
is because unibyte buffers should not be reordered.



reply via email to

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