[Top][All Lists]

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

Re: Ctrl-[ ?

From: Ergus
Subject: Re: Ctrl-[ ?
Date: Wed, 12 Jun 2019 10:56:50 +0200
User-agent: NeoMutt/20180716

On Wed, Jun 12, 2019 at 10:08:44AM +0200, S??ren Pilg??rd wrote:
On Fri, Jun 7, 2019 at 9:51 PM Eli Zaretskii <address@hidden> wrote:

> Cc: address@hidden
> From: Cl??ment Pit-Claudel <address@hidden>
> Date: Fri, 7 Jun 2019 11:02:12 -0400
> >>   (global-set-key (kbd "ESC") #'forward-char)
> >>
> >> ???and all that achieved was to break all keybindings starting with meta.
> >
> > In what buffer?  If there's a local binding, it will shadow the
> > global one, so to be sure rebind both.
> I *scratch* (so in emacs-lisp-mode).  It does work in fundamental mode, but 
it still breaks meta (M-x is undefined after redefining ESC)

The original question was about redefining ESC.  How to do that
without making Meta undefined is a separate issue.  (ESC by default is
the prefix key of the Meta keymap, so it's a small wonder that
redefining ESC breaks Meta.  You will have the same effect if you
redefine C-x: all the C-x sequences will stop working.)

So for a lot of users, using graphical Emacs, not knowing the
intricacies of af tty the following is rather baffling:
C-[ is ESC, ESC is Meta and Meta is Alt.
(For a confusing definition of "is")
This is one of the things that makes Emacs feel very archaic. I do
believe that most users coming to Emacs during the last 5-10 years are
using the graphical version. Yeah we should keep the ability to use
both the tty version and the graphical version as is. But forcing this
schema on everyone is not really beneficial.

I partially agree here because the few users I know that came to emacs
are using only the tty version, because we work in servers and remote
machines (and tramp is not always useful for us). Basically we wanted a
decent editor for the terminal without modes.

Said that, with the right terminal emulator (say xterm, rxvt or some
others) it is possible to customize this behavior very similar to what
the gui does. And it is even possible to provide a config to do so (if
there are issues) in order to send different commands for:

C-i /= TAB
C-m /= RET
C-[ /= ESC
C-? /= erase

Or even make it case sensitive:

C-letter /= C-S-letter

So, actually forcing this schema is not due to technical reasons in my
opinion, but backward (human) compatibility.

If sometime this is properly fixed (there is an agreement), then some
terminal users will be allowed to use Control- jkli or hjkl as arrows
and the meta equivalents. But also we will have many new bindings to set
(all the C-S-letter M-S-letter) that potentially could be set to
opposite actions in some cases like undo/redo goto-next/goto-previous,
zap-to-char-forward/zap-to-char-backward or new actions like transpose

reply via email to

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