emacs-devel
[Top][All Lists]
Advanced

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

RE: A wish, a plea


From: Drew Adams
Subject: RE: A wish, a plea
Date: Fri, 22 Jun 2007 08:31:29 -0700

> > Any key binding can be hit accidentally, especially one with
> > repetition such as C-x C-c C-x.
>
> In my experience, you just wont hit that specific sequence by accident
> -- ok, maybe I did hit it once or twice since 1985, but once every 10
> year is tolerable :-)

It was just an example. The point was to not only make the binding more
difficult to type accidentally, but to also display a confirmation message
that points out what's happening, which can be important in case of a typing
mistake.

The number of keystrokes is the same (3) in those two examples:

 C-x C-c C-x
 C-x C-c y

But in the second case you at least see a confirmation message. In practice,
this has served me well many times: If I really intend to exit, then I type
`C-x C-c y' all at once, but if I accidentally hit `C-x C-c' then I see the
message and hit `n' or C-g. Also, `C-x C-c y' requires me to use both hands
(I use both hands to type), since `y' is on the right hand, and that makes
it even more unlikely that I would accidentally type `C-x C-c y'.

Use of `kill-emacs-query-functions' with `y-or-n-p' isn't tied to `C-x C-c',
of course. This suggestion is independent of suggestions by others to use a
different binding than `C-x C-c'. (`C-x C-c' is OK by me, though.)

I propose that we add such a function to `kill-emacs-query-functions' by
default. Any experienced user can always use `remove-hook' to get rid of it,
if desired.






reply via email to

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