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 11:21:12 +0300

> From: "Drew Adams" <address@hidden>
> Cc: <address@hidden>
> Date: Fri, 27 May 2011 15:08:46 -0700
> 
> > 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.

An alias doesn't make the aliased function go away, it just gives it a
different name, for backward compatibility.  So let's talk about the
new name: are you saying that we should _rename_ `backward-char' into
something else? if so, what would that new name be?

The problem here is that C-f/C-b _always_ move forward/backward in the
buffer, while <right>/<left> _always_ move to the right resp. left
(well, _almost_ always, but let's forget about those complications for
a moment).  I think there's a need for both behaviors.  We could
perhaps find some way to make both sets of keys bound to the same
command, but how to call that command is not an insignificant issue.
I couldn't find a good name; can you?

> This is really not the point.

See, it _is_ the point, at least part of it.  The name of a command is
its best documentation, as you wrote many times here.  The name must
express what the command does, or users and Lisp programmers will be
confused.

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

I object to name that command `froblorph', but otherwise have no
serious objections to binding C-f/C-b and arrows to the same command,
provided that it will behave like right-char/left-char when invoked
through the arrow keys and like forward-char/backward-char when
invoked by C-f/C-b.  If you can show the code to do that, please do,
and let's then discuss whether your solution is better than what's
currently in the repository.

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

Not sure what you mean by "be what it has been": do you mean always to
move one character position back in the buffer?  If so, this is
already possible in at least 2 ways: (a) bind bidi-paragraph-direction
to left-to-right when invoking left-char, or (b) never use text that
includes characters from right-to-left scripts.



reply via email to

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