Re: Prevent Emacs from Killing R Window
Charles C. Berry <cberry <at> tajo.ucsd.edu>
2009-03-04 02:48:19 GMT
On Tue, 3 Mar 2009, Aric Gregson wrote:
> Just wondering if there is a way to get ESS to require a confirmation
> prior to killing a buffer that is running R? I just lost 3 hours of
> workspace by hitting the wrong key combination. Fortunately, the work
> is scripted, but this is very inconvenient.
Yes. 'Disabling' the command. In the emacs info:
57.4.10 Disabling Commands
--------------------------
Disabling a command means that invoking it interactively asks for
confirmation from the user. The purpose of disabling a command is to
prevent users from executing it by accident; we do this for commands
that might be confusing to the uninitiated.
Attempting to invoke a disabled command interactively in Emacs
displays a window containing the command's name, its documentation, and
some instructions on what to do immediately; then Emacs asks for input
saying whether to execute the command as requested, enable it and
execute it, or cancel. If you decide to enable the command, you must
then answer another question--whether to do this permanently, or just
for the current session. (Enabling permanently works by automatically
editing your `.emacs' file.) You can also type `!' to enable _all_
commands, for the current session only.
.
.
.
(Continue reading)