Lennart Borgman <address@hidden> writes:
Richard Stallman wrote:
How do you stop a command like `find-grep-dired'? I tried C-g
and M-ESC-ESC but none of them worked. I looked in the menus,
but I found nothing obvious there. (I did this on w32.)
Since the buffer fills asynchronously, C-g won't stop it.
Killing the buffer should do so. Does that work?
It does, but suppose you want the information that is already there?
That could be the case for `grep-find' for example. Why not bind C-g
to something like this in those buffers (or globally)?
(defun keyboard-process-quit()
"Delete buffer process if there is one or signal a `quit' condition."
(interactive)
(if (get-buffer-process (current-buffer))
(delete-process (current-buffer))
(keyboard-quit)))
Because C-g is used to abort a lot of actions, like searching,
incomplete key sequences and so on. When we are doing M-!, Emacs
stays busy and so C-g is an unambiguous way of stopping a program.
But in comint buffers, I'd want something more explicit like C-c C-c
(incidentally, isn't that the way to kill already?).