[Top][All Lists]

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

Re: S-backspace

From: Luc Teirlinck
Subject: Re: S-backspace
Date: Wed, 28 May 2003 20:46:11 -0500 (CDT)

Richard Stallman wrote:

       Caution! Danger! Do not necessarily try!

            Kill balanced expression backward (`backward-kill-sexp').

   Perhaps we should delete that binding.  The hard thing is that it
   works fine when you are not in X.

The binding itself is clearly not dangerous, once Emacs even gets to
see the binding the danger is over.  The danger consists in
encouraging people to use it without properly warning them.  I
suggested adding such a warning to the relevant section of the Emacs

There are four closely related bindings involved:  C-M-<DEL>,
C-Alt-<DEL>, C-M-<backspace> and C-Alt-<backspace>.

Strictly speaking, as Stefan remarked, the one that kills the X server
is C-Alt-<backspace>, but many keyboards do not have separate Alt and
Meta keys, making the last two key-combinations very dangerous.  Adding
a shift key to these last two ones is no help: the X server gets
killed anyway.

The two first ones are used for logout on many operating systems.  All
those I know of warn (actually even present several options), leading
to inconvenience and confusion rather than outright danger.  Moreover,
here shifting does seem to work.  (This may not work for all operating
systems.  It is sufficient if it works for operating systems using X.
Otherwise, one can use C-M-backspace.)  On my system, C-M-<DEL> is
controlled by sawfish, which binds it to "gnome logout".  In my .emacs
I bind C-M-S-<DEL> to `backward-kill-sexp', sawfish ignores it because
of the shift key, and everything seems to work fine.  It does not work
under emacs -nw, but plenty of bindings do not seem to work under
emacs -nw.

So what about the following solution:

1.  Explain the dangers in the relevant section of the Emacs manual.

2.  Add C-M-S-<DEL> as a binding for backward-kill-sexp.



reply via email to

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