all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: `C-b' is backward-char, `left' is left-char - why?
Date: Fri, 27 May 2011 15:08:46 -0700	[thread overview]
Message-ID: <392401A7079D400E86B791262598387D@us.oracle.com> (raw)
In-Reply-To: <83tycfc0l0.fsf@gnu.org>

Thanks for the explanation.  Essentially, you've said that (a) the world wants
bidi and already uses it - which I already acknowledged, and (b) its redefining
of default keys _cannot_ be made optional because it needs to do certain things
automatically.

With my still limited understanding, I do not see the latter requirement, and I
do not see that you have demonstrated (explained) it.  See below.  That
Enacs-for-bidi needs to do certain things is one thing.  That it needs to be
imposed on everyone all the time, in order to be able to do those things when
appropriate is not so clear - not in your explanation so far.

> Because users of right-to-left scripts expect the current behavior of
> the arrow keys.
>
> > Why not make bidi optional?
> 
> It _is_ optional: you can set bidi-display-reordering to nil.

Obviously I meant optional in the sense that I was questioning.  How to prevent
it from binding default keys in this way?  You say it must bind `left' to
`left-char' instead of `backward-char'.  That obligation does not sound very
optional.

I will rarely, if ever, use bidi.  OK, maybe I'm a minority of one.  Still, how
can I prevent it from hijacking keys that normally would be bound to the same
good-ol' commands?  It doesn't help me much that the commands they are now bound
to might do the same thing, as I pointed out.  Commands are soemtimes used and
manipulated by code, in addition to being invoked interactively and individually
by users.  That's why we have things such as `remap' and
`substitute-key-definition'.

> > 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.

That it should automatically do things for people who want it I can understand.
But for someone who never wants it?

More importantly, what prevents a minor mode, which could even be enabled by
default for all I care, from doing just what you said: automatically...?  Turn
on the mode and you get what you've provided - everything.  Turn it off and you
get what Emacs has provided for years, limited as it might be.

I don't see how using a minor mode would prevent you from doing anything at all
that you want or need to do.  Can you please explain that?  At least having a
mode for this would give users a way to turn all of its effects off (hopefully -
at least the key hijacking I'm referring to).

IOW, if your `left-char' command makes sense only when bidi minor mode is turned
on, then it would not be made to hijack `left' except when that mode is on.
Minor modes can have their own keymaps, and if need be they can also be made to
change/restore other bindings (i.e. in different maps) when you turn them
on/off.

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

I have nothing against that.  I would like a way (if possible) for an individual
user to turn off its automatic sensitivity, rebinding of keys, etc.  That's all.
Even if there are few of us users who won't use bidi much, it would be nice to
give us the possibility of non-bidiness.

No one is trying to prevent bidi users from bidying (to coin a word).  Please do
not turn things around - I am not trying to prevent any bidiness among
consenting adults.  I'm all in favor of Emacs becoming bidi-enabled.  I only
hope that its bidification doesn't impose changes on people who don't need or
want to take advantage of bidi.

Enabling (or disabling) as an option - is that impossible?

> 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.

See what I said in my first message.  Even if command `left-char' behaves the
same as command `backward-char' when the text doesn't include any..., that does
not help with code that remaps commands etc.

Many tests involving commands check only their symbols, not their definitions,
so even if these symbols had the _exact same_ function definition things would
break.  Think `substitute-key-definition'.

> And another reason: if `left' sometimes moves _forward_ in the buffer,
> binding it to a command called `backward-char' is a lie.

So create an alias.  This is really not the point.

It would be good for a user to optionally be able to have the traditional
behavior of having `C-b' and `left' bound by default to the _same_ command (same
symbol), whether it is `froblorph' or `backward-char' or `left-char'.

In addition, if possible it would be good for a user to optionally have that
same command be what it has been since the big bang: `backward-char'.  Any code
expecting that default binding or command name would then have a better chance
of behaving as expected.

If, as you suggest, but haven't yet backed up, you simply _cannot_ put this
stuff in a minor mode for some reason - even turning the mode on by default if
you want, then so be it.  I don't see that restriction yet, and would like to
hear the `why'.  But if it is truly a hard and fast limit for some reason, then
so be it.  On n'arrete pas le progres.




  parent reply	other threads:[~2011-05-27 22:08 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 20:40 `C-b' is backward-char, `left' is left-char - why? Drew Adams
2011-05-27 20:48 ` Pascal J. Bourguignon
2011-05-27 21:11   ` Eli Zaretskii
2011-05-27 22:08   ` Drew Adams
2011-05-28  0:19   ` Nix
2011-05-27 21:09 ` Eli Zaretskii
2011-05-27 21:13   ` Eli Zaretskii
2011-05-27 22:08   ` Drew Adams [this message]
2011-05-27 22:23     ` Antoine Levitt
2011-05-27 23:19       ` Drew Adams
2011-05-28  0:46         ` Mohsen BANAN
2011-05-28  1:53           ` Drew Adams
2011-05-28  2:24             ` Mohsen BANAN
2011-05-28  8:00         ` Eli Zaretskii
2011-05-27 23:09     ` PJ Weisberg
2011-05-27 23:23       ` Drew Adams
2011-05-28  0:25         ` PJ Weisberg
2011-05-28  0:39           ` Drew Adams
2011-05-28  6:57             ` David Kastrup
2011-05-28  8:21     ` Eli Zaretskii
2011-05-28  0:48 ` Stefan Monnier
2011-05-28  1:54   ` Drew Adams
2011-05-28  7:07     ` David Kastrup
2011-05-28  8:26     ` Eli Zaretskii
2011-05-30  3:57     ` Stefan Monnier
2011-05-31 14:18       ` Davis Herring
2011-05-31 14:39         ` Eli Zaretskii
2011-06-01 11:48         ` Andy Moreton
2011-06-01 13:23           ` Eli Zaretskii
2011-06-01 23:26             ` Andy Moreton
2011-06-02  4:37               ` Eli Zaretskii
2011-06-02 10:38                 ` Andy Moreton
2011-06-02 11:12                   ` Eli Zaretskii
2011-06-02 12:59                     ` Andy Moreton
2011-06-02 15:09                       ` Eli Zaretskii
2011-06-02 16:23                         ` Andy Moreton
2011-06-02 17:43                           ` Eli Zaretskii
2011-06-02 21:42                             ` Andy Moreton
2011-06-03  7:01                               ` Eli Zaretskii
2011-06-02 17:09                         ` David Kastrup
2011-06-02 18:05                           ` Eli Zaretskii
2011-06-03 14:35                             ` David Kastrup
2011-06-03 15:08                               ` Eli Zaretskii
2011-06-03 15:14                                 ` David Kastrup
2011-06-03 16:48                                   ` Eli Zaretskii
2011-06-03 20:56                                     ` David Kastrup
2011-06-04  6:28                                       ` Eli Zaretskii
2011-06-05 16:51                                 ` Ehud Karni
2011-06-05 17:10                                   ` Eli Zaretskii
2011-06-05 17:19                                     ` Ehud Karni
2011-06-05 17:26                                       ` David Kastrup
2011-06-05 17:44                                         ` Eli Zaretskii
2011-06-05 18:26                                           ` David Kastrup
2011-06-05 19:22                                             ` Eli Zaretskii
2011-06-07  8:51                                               ` David Kastrup
2011-06-07 10:54                                                 ` Eli Zaretskii
2011-06-02 15:35                       ` PJ Weisberg
2011-06-02 17:44                         ` Eli Zaretskii
2011-06-02 19:29                           ` PJ Weisberg
2011-06-02 21:10                             ` Eli Zaretskii
2011-06-03  0:47                   ` Kenichi Handa
2011-06-03  7:13                     ` Eli Zaretskii
2011-06-05 11:27                       ` Kenichi Handa
2011-06-05 13:04                         ` Eli Zaretskii
2011-06-02  7:23             ` David Kastrup
2011-06-02  8:59               ` Eli Zaretskii

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=392401A7079D400E86B791262598387D@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --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.