* How to stop find-grep-dired? @ 2006-08-18 15:20 Lennart Borgman 2006-08-19 4:35 ` Richard Stallman 2006-08-19 8:44 ` Andreas Schwab 0 siblings, 2 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-18 15:20 UTC (permalink / raw) 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.) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-18 15:20 How to stop find-grep-dired? Lennart Borgman @ 2006-08-19 4:35 ` Richard Stallman 2006-08-19 7:40 ` Lennart Borgman 2006-08-19 8:44 ` Andreas Schwab 1 sibling, 1 reply; 42+ messages in thread From: Richard Stallman @ 2006-08-19 4:35 UTC (permalink / raw) Cc: emacs-devel 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? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 4:35 ` Richard Stallman @ 2006-08-19 7:40 ` Lennart Borgman 2006-08-19 7:45 ` David Kastrup 2006-08-20 4:32 ` Richard Stallman 0 siblings, 2 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-19 7:40 UTC (permalink / raw) Cc: emacs-devel 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))) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 7:40 ` Lennart Borgman @ 2006-08-19 7:45 ` David Kastrup 2006-08-19 8:09 ` Lennart Borgman 2006-08-20 4:32 ` Richard Stallman 1 sibling, 1 reply; 42+ messages in thread From: David Kastrup @ 2006-08-19 7:45 UTC (permalink / raw) Cc: rms, emacs-devel Lennart Borgman <lennart.borgman.073@student.lu.se> 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?). -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 7:45 ` David Kastrup @ 2006-08-19 8:09 ` Lennart Borgman 2006-08-19 8:28 ` David Kastrup 0 siblings, 1 reply; 42+ messages in thread From: Lennart Borgman @ 2006-08-19 8:09 UTC (permalink / raw) Cc: rms, emacs-devel David Kastrup wrote: > Lennart Borgman <lennart.borgman.073@student.lu.se> 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?). > In the *grep* buffer C-c C-c runs `compile-goto-error'. I would like it very simple and always beeing able to use C-g for stopping seems desireable to me. How about asking before deleting the process? Something like this: (defun keyboard-process-quit() "Delete buffer process if there is one or signal a `quit' condition." (interactive) (let* ((buf-proc (get-buffer-process (current-buffer))) (del-proc (when buf-proc (y-or-n-p (format "Delete process %s in current buffer? " buf-proc))))) (if del-proc (progn (delete-process (current-buffer)) (goto-char (point-max))) (keyboard-quit)))) BTW, how do you see if a process is asynchronous? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 8:09 ` Lennart Borgman @ 2006-08-19 8:28 ` David Kastrup 2006-08-19 8:36 ` Lennart Borgman 0 siblings, 1 reply; 42+ messages in thread From: David Kastrup @ 2006-08-19 8:28 UTC (permalink / raw) Cc: rms, emacs-devel Lennart Borgman <lennart.borgman.073@student.lu.se> writes: > BTW, how do you see if a process is asynchronous? Emacs couldn't update the window otherwise. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 8:28 ` David Kastrup @ 2006-08-19 8:36 ` Lennart Borgman 2006-08-19 8:49 ` David Kastrup 2006-08-21 18:40 ` Stuart D. Herring 0 siblings, 2 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-19 8:36 UTC (permalink / raw) Cc: rms, emacs-devel David Kastrup wrote: > Lennart Borgman <lennart.borgman.073@student.lu.se> writes: > > >> BTW, how do you see if a process is asynchronous? >> > > Emacs couldn't update the window otherwise. > Yes, but how do you know that the process is async from elisp? Or is that maybe just a stupid question .... ;-) I was just thinking about stopping sync processes. Could that be done with C-g (maybe rewritten)? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 8:36 ` Lennart Borgman @ 2006-08-19 8:49 ` David Kastrup 2006-08-19 10:40 ` Lennart Borgman 2006-08-21 18:40 ` Stuart D. Herring 1 sibling, 1 reply; 42+ messages in thread From: David Kastrup @ 2006-08-19 8:49 UTC (permalink / raw) Cc: rms, emacs-devel Lennart Borgman <lennart.borgman.073@student.lu.se> writes: > David Kastrup wrote: >> Lennart Borgman <lennart.borgman.073@student.lu.se> writes: >> >> >>> BTW, how do you see if a process is asynchronous? >>> >> >> Emacs couldn't update the window otherwise. >> > Yes, but how do you know that the process is async from elisp? Or is > that maybe just a stupid question .... ;-) Because of the way is was started. call-process starts synchronous processes (with the exception of a 0 argument for BUFFER, in which case the process is detached), start-process starts asynchronous processes. > I was just thinking about stopping sync processes. Could that be done > with C-g (maybe rewritten)? The doc string for start-process already states If BUFFER is 0, `call-process' returns immediately with value nil. Otherwise it waits for PROGRAM to terminate and returns a numeric exit status or a signal description string. If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 8:49 ` David Kastrup @ 2006-08-19 10:40 ` Lennart Borgman 2006-08-19 10:47 ` David Kastrup 2006-08-20 4:32 ` Richard Stallman 0 siblings, 2 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-19 10:40 UTC (permalink / raw) Cc: rms, emacs-devel David Kastrup wrote: >> I was just thinking about stopping sync processes. Could that be done >> with C-g (maybe rewritten)? >> > > The doc string for start-process already states > > If BUFFER is 0, `call-process' returns immediately with value nil. > Otherwise it waits for PROGRAM to terminate and returns a numeric > exit status or a signal description string. If you quit, the > process is killed with SIGINT, or SIGKILL if you quit again. > Thanks David. (You mean the doc string for call-process of course.) It is BTW a bit hard to understand what "if you quit" means here, but it is described in "(elisp) Synchronous Processes" I see now. Maybe the doc string needs a bit more explanation? From this info node: While Emacs waits for the synchronous subprocess to terminate, the user can quit by typing `C-g'. Why not have this behaviour for async processes too then? Ambigouties can perhaps be removed by that little question I added to my suggestion in another message. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 10:40 ` Lennart Borgman @ 2006-08-19 10:47 ` David Kastrup 2006-08-19 14:53 ` Lennart Borgman 2006-08-20 4:32 ` Richard Stallman 1 sibling, 1 reply; 42+ messages in thread From: David Kastrup @ 2006-08-19 10:47 UTC (permalink / raw) Cc: rms, emacs-devel Lennart Borgman <lennart.borgman.073@student.lu.se> writes: > It is BTW a bit hard to understand what "if you quit" means here, > but it is described in "(elisp) Synchronous Processes" I see > now. Maybe the doc string needs a bit more explanation? > > From this info node: > > While Emacs waits for the synchronous subprocess to terminate, the > user can quit by typing `C-g'. C-g is Emacs' way to trigger a `quit' signal. > Why not have this behaviour for async processes too then? I seem to remember that I already provided an answer to the question. > Ambigouties can perhaps be removed by that little question I added > to my suggestion in another message. Any question like that is supposed to be abortable with C-g. It would be a nuisance if that happened to stop the process. It would also mean that the sequence to stop a process would need to be C-g y and I don't see the advantage over C-c C-k. There is a concern that we should probably unify on this key sequence: for example, I have been bitten by C-c C-c actually killing a CVS process. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 10:47 ` David Kastrup @ 2006-08-19 14:53 ` Lennart Borgman 2006-08-19 15:04 ` David Kastrup 0 siblings, 1 reply; 42+ messages in thread From: Lennart Borgman @ 2006-08-19 14:53 UTC (permalink / raw) Cc: rms, emacs-devel David Kastrup wrote: >> Why not have this behaviour for async processes too then? >> > > I seem to remember that I already provided an answer to the question. > Maybe I misunderstood you, but was the reason not the ambiguity? > >> Ambiguoties can perhaps be removed by that little question I added >> to my suggestion in another message. >> > > Any question like that is supposed to be abortable with C-g. It would > be a nuisance if that happened to stop the process. You can still cancel the prompt with my solution. At least that is the case when it works. There is something strange going on when I test my solution. Sometimes it seems like C-g still just runs keyboard-quit. I do not really understand why. Is it not possible to rebind C-g? Another problem perhaps. If C-g is bound to keyboard-quit I get messages like this in the message buffer: QuitError during redisplay: (quit) Error during redisplay: (quit) > It would also > mean that the sequence to stop a process would need to be C-g y and I > don't see the advantage over C-c C-k. > The advantage is that the user just have to remember C-g. > There is a concern that we should probably unify on this key sequence: > for example, I have been bitten by C-c C-c actually killing a CVS > process. > I agree with the principle but I would prefer C-g for similar reasons. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 14:53 ` Lennart Borgman @ 2006-08-19 15:04 ` David Kastrup 2006-08-19 15:18 ` Lennart Borgman 0 siblings, 1 reply; 42+ messages in thread From: David Kastrup @ 2006-08-19 15:04 UTC (permalink / raw) Cc: rms, emacs-devel Lennart Borgman <lennart.borgman.073@student.lu.se> writes: > Another problem perhaps. If C-g is bound to keyboard-quit I get > messages like this in the message buffer: > > QuitError during redisplay: (quit) > Error during redisplay: (quit) > >> It would also >> mean that the sequence to stop a process would need to be C-g y and I >> don't see the advantage over C-c C-k. >> > The advantage is that the user just have to remember C-g. > >> There is a concern that we should probably unify on this key sequence: >> for example, I have been bitten by C-c C-c actually killing a CVS >> process. >> > I agree with the principle but I would prefer C-g for similar reasons. I disagree. C-g is supposed to stop Emacs, not other processes. I don't consider it a good idea to have to worry about arbitrary processes terminating. IIRC, keyboard-quit events even cut straight across a lot of the input loop. It is probably not even useful to rebind them in local keymaps, since those keymaps might not be active at the time C-g is pressed. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 15:04 ` David Kastrup @ 2006-08-19 15:18 ` Lennart Borgman 0 siblings, 0 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-19 15:18 UTC (permalink / raw) Cc: rms, emacs-devel David Kastrup wrote: > I disagree. C-g is supposed to stop Emacs, not other processes. I > don't consider it a good idea to have to worry about arbitrary > processes terminating. Would it be better if some processes were excluded? Could something else be done to enhance my idea? (Except dropping it ;-) > IIRC, keyboard-quit events even cut straight > across a lot of the input loop. It is probably not even useful to > rebind them in local keymaps, since those keymaps might not be active > at the time C-g is pressed. > Thanks. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 10:40 ` Lennart Borgman 2006-08-19 10:47 ` David Kastrup @ 2006-08-20 4:32 ` Richard Stallman 1 sibling, 0 replies; 42+ messages in thread From: Richard Stallman @ 2006-08-20 4:32 UTC (permalink / raw) Cc: emacs-devel While Emacs waits for the synchronous subprocess to terminate, the user can quit by typing `C-g'. Why not have this behaviour for async processes too then? Asynch processes are not commands; making C-g affect them would cause confusion. For C-g to ask a question about which kind of quitting to do would be a pain in the neck. Please drop this idea. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 8:36 ` Lennart Borgman 2006-08-19 8:49 ` David Kastrup @ 2006-08-21 18:40 ` Stuart D. Herring 2006-08-21 23:40 ` Lennart Borgman 1 sibling, 1 reply; 42+ messages in thread From: Stuart D. Herring @ 2006-08-21 18:40 UTC (permalink / raw) Cc: emacs-devel > Yes, but how do you know that the process is async from elisp? Or is > that maybe just a stupid question .... ;-) Sorry if the ;-) means you know this, but just in case not: You never see a synchronous process from elisp. No elisp is evaluating while the process runs. So the answer is "all processes are asynchronous" in the sense of all processes that you ever see. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-21 18:40 ` Stuart D. Herring @ 2006-08-21 23:40 ` Lennart Borgman 0 siblings, 0 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-21 23:40 UTC (permalink / raw) Cc: emacs-devel Stuart D. Herring wrote: >> Yes, but how do you know that the process is async from elisp? Or is >> that maybe just a stupid question .... ;-) >> > > Sorry if the ;-) means you know this, but just in case not: > > You never see a synchronous process from elisp. No elisp is evaluating > while the process runs. So the answer is "all processes are asynchronous" > in the sense of all processes that you ever see. > > Davis > Thanks for your kindness. I think the explanation is a valuable one. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 7:40 ` Lennart Borgman 2006-08-19 7:45 ` David Kastrup @ 2006-08-20 4:32 ` Richard Stallman 2006-08-21 8:56 ` Ehud Karni 2006-08-21 9:15 ` Lennart Borgman 1 sibling, 2 replies; 42+ messages in thread From: Richard Stallman @ 2006-08-20 4:32 UTC (permalink / raw) Cc: emacs-devel > 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? What is the motive for wanting to stop the process? What harm does it do to let the process keep running? Does M-x kill-grep kill the process for find-grep-dired? If not, I think we should make it work. That could be the case for `grep-find' for example. Why not bind C-g to something like this in those buffers (or globally)? I get a bad feeling about that. People type C-g to try to cancel commands, and sometimes do so by mistake in betweeen commands. This is a matter of habit. If the habit activates itself while find-grep-dired is running, it could kill the process when you don't want to. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-20 4:32 ` Richard Stallman @ 2006-08-21 8:56 ` Ehud Karni 2006-08-21 9:14 ` Lennart Borgman 2006-08-22 3:09 ` Richard Stallman 2006-08-21 9:15 ` Lennart Borgman 1 sibling, 2 replies; 42+ messages in thread From: Ehud Karni @ 2006-08-21 8:56 UTC (permalink / raw) Cc: lennart.borgman.073, emacs-devel On Sun, 20 Aug 2006 00:32:30 -0400, Richard Stallman <rms@gnu.org> wrote: > > Does M-x kill-grep kill the process for find-grep-dired? > If not, I think we should make it work. > > That could be the case for `grep-find' for example. Why not bind C-g to > something like this in those buffers (or globally)? > > I get a bad feeling about that. People type C-g to try to cancel > commands, and sometimes do so by mistake in betweeen commands. This > is a matter of habit. If the habit activates itself while > find-grep-dired is running, it could kill the process when you > don't want to. I suggest to use C-x C-g to kill the buffer's associated process (any, not just grep) like this: (defun kill-async-process () "Kill the asynchronous process associated with this buffer" (interactive) (delete-process nil)) (global-set-key "\C-x\C-g" 'kill-async-process) This can not harm, because you must use it in the relevant buffer. Ehud. -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-21 8:56 ` Ehud Karni @ 2006-08-21 9:14 ` Lennart Borgman 2006-08-22 3:09 ` Richard Stallman 1 sibling, 0 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-21 9:14 UTC (permalink / raw) Cc: rms, emacs-devel Ehud Karni wrote: > On Sun, 20 Aug 2006 00:32:30 -0400, Richard Stallman <rms@gnu.org> wrote: > >> Does M-x kill-grep kill the process for find-grep-dired? >> If not, I think we should make it work. >> >> That could be the case for `grep-find' for example. Why not bind C-g to >> something like this in those buffers (or globally)? >> >> I get a bad feeling about that. People type C-g to try to cancel >> commands, and sometimes do so by mistake in betweeen commands. This >> is a matter of habit. If the habit activates itself while >> find-grep-dired is running, it could kill the process when you >> don't want to. >> > > I suggest to use C-x C-g to kill the buffer's associated process (any, > not just grep) like this: > > (defun kill-async-process () > "Kill the asynchronous process associated with this buffer" > (interactive) > (delete-process nil)) > > (global-set-key "\C-x\C-g" 'kill-async-process) > > This can not harm, because you must use it in the relevant buffer. > I was going to make the same kind of suggestion. However maybe C-c C-g is better since this kind of key sequences are reserved for major modes (see "(info) Key Binding Conventions") and the actual command to use for stopping/killing is dependent on the major mode. Typing it several times could maybe make Emacs try harder to stop the subprocess. This is the same idea as is used today for synch subprocesses where typing C-g once sends SIGINT and if C-g is typed again then SIGKILL is sent to the subprocess (see "(info) Creating Synchronous Processes"). ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-21 8:56 ` Ehud Karni 2006-08-21 9:14 ` Lennart Borgman @ 2006-08-22 3:09 ` Richard Stallman 2006-08-22 5:44 ` Lennart Borgman 1 sibling, 1 reply; 42+ messages in thread From: Richard Stallman @ 2006-08-22 3:09 UTC (permalink / raw) Cc: lennart.borgman.073, emacs-devel I suggest to use C-x C-g to kill the buffer's associated process (any, not just grep) like this: No good; typing C-g after C-x is the way to cancel the C-x. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-22 3:09 ` Richard Stallman @ 2006-08-22 5:44 ` Lennart Borgman 2006-08-22 5:59 ` Drew Adams 2006-08-22 15:41 ` Richard Stallman 0 siblings, 2 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-22 5:44 UTC (permalink / raw) Cc: ehud, emacs-devel Richard Stallman wrote: > I suggest to use C-x C-g to kill the buffer's associated process (any, > not just grep) like this: > > No good; typing C-g after C-x is the way to cancel the C-x. > "C-c C-k" ? C-c because it is mode specific, C-k as a mnemonic for kill. ^ permalink raw reply [flat|nested] 42+ messages in thread
* RE: How to stop find-grep-dired? 2006-08-22 5:44 ` Lennart Borgman @ 2006-08-22 5:59 ` Drew Adams 2006-08-22 7:21 ` Lennart Borgman 2006-08-22 15:41 ` Richard Stallman 1 sibling, 1 reply; 42+ messages in thread From: Drew Adams @ 2006-08-22 5:59 UTC (permalink / raw) > I suggest to use C-x C-g to kill the buffer's associated > process (any, not just grep) like this: > > No good; typing C-g after C-x is the way to cancel the C-x. "C-c C-k" ? C-c because it is mode specific, C-k as a mnemonic for kill. I wonder if we really need a key binding for this. Is it something people will do often? Wouldn't using M-x suffice? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-22 5:59 ` Drew Adams @ 2006-08-22 7:21 ` Lennart Borgman 0 siblings, 0 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-22 7:21 UTC (permalink / raw) Cc: emacs-devel Drew Adams wrote: > > I suggest to use C-x C-g to kill the buffer's associated > > process (any, not just grep) like this: > > > > No good; typing C-g after C-x is the way to cancel the C-x. > > "C-c C-k" ? > > C-c because it is mode specific, C-k as a mnemonic for kill. > > I wonder if we really need a key binding for this. Is it something people > will do often? Wouldn't using M-x suffice? > If the subprocess is using much CPU it can take quite a while before the M-x prompt appear. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-22 5:44 ` Lennart Borgman 2006-08-22 5:59 ` Drew Adams @ 2006-08-22 15:41 ` Richard Stallman 2006-08-22 15:52 ` Andreas Schwab 1 sibling, 1 reply; 42+ messages in thread From: Richard Stallman @ 2006-08-22 15:41 UTC (permalink / raw) Cc: ehud, emacs-devel "C-c C-k" ? C-c because it is mode specific, C-k as a mnemonic for kill. I see C-c C-k already has that meaning in the buffers made by M-x grep and M-x compile. So let's set it up to kill the process of find-grep-dired as well. I previously suggested defining a command that would kill the process for various such modes; but making C-c C-k do the job in all these modes seems simpler, and more upward compatible. Would someone like to implement C-c C-k for find-grep-dired? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-22 15:41 ` Richard Stallman @ 2006-08-22 15:52 ` Andreas Schwab 2006-08-22 16:31 ` Lennart Borgman 2006-08-23 4:06 ` Richard Stallman 0 siblings, 2 replies; 42+ messages in thread From: Andreas Schwab @ 2006-08-22 15:52 UTC (permalink / raw) Cc: Lennart Borgman, ehud, emacs-devel Richard Stallman <rms@gnu.org> writes: > I see C-c C-k already has that meaning in the buffers made by M-x grep > and M-x compile. So let's set it up to kill the process of > find-grep-dired as well. It already does. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-22 15:52 ` Andreas Schwab @ 2006-08-22 16:31 ` Lennart Borgman 2006-08-24 6:12 ` Lennart Borgman 2006-08-23 4:06 ` Richard Stallman 1 sibling, 1 reply; 42+ messages in thread From: Lennart Borgman @ 2006-08-22 16:31 UTC (permalink / raw) Cc: ehud, rms, emacs-devel Andreas Schwab wrote: > Richard Stallman <rms@gnu.org> writes: > > >> I see C-c C-k already has that meaning in the buffers made by M-x grep >> and M-x compile. So let's set it up to kill the process of >> find-grep-dired as well. >> > > It already does. > > Andreas. > Thanks. I did not notice and now I know why. When using Cygwin for the inferior process trying to use kill-find just hangs Emacs. So there is a bug here. kill-find now uses `delete-process'. Using `interrupt-process' or `kill-process' works instead. Is there any reason not to use them? Or at least try them first? Maybe a process killing command should try this one after the other until the process is gone? (And then do the mode specific cleanup.) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-22 16:31 ` Lennart Borgman @ 2006-08-24 6:12 ` Lennart Borgman 0 siblings, 0 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-24 6:12 UTC (permalink / raw) Cc: Andreas Schwab, ehud, rms, emacs-devel Lennart Borgman wrote: > Andreas Schwab wrote: >> Richard Stallman <rms@gnu.org> writes: >> >> >>> I see C-c C-k already has that meaning in the buffers made by M-x grep >>> and M-x compile. So let's set it up to kill the process of >>> find-grep-dired as well. >>> >> >> It already does. >> >> Andreas. >> > Thanks. I did not notice and now I know why. When using Cygwin for the > inferior process trying to use kill-find just hangs Emacs. So there is > a bug here. > > kill-find now uses `delete-process'. Using `interrupt-process' or > `kill-process' works instead. Is there any reason not to use them? Or > at least try them first? > > Maybe a process killing command should try this one after the other > until the process is gone? (And then do the mode specific cleanup.) I got no repsonse to this. Please notice that this is a bug on w32! ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-22 15:52 ` Andreas Schwab 2006-08-22 16:31 ` Lennart Borgman @ 2006-08-23 4:06 ` Richard Stallman 2006-08-29 22:04 ` Juri Linkov 1 sibling, 1 reply; 42+ messages in thread From: Richard Stallman @ 2006-08-23 4:06 UTC (permalink / raw) Cc: lennart.borgman.073, ehud, emacs-devel > I see C-c C-k already has that meaning in the buffers made by M-x grep > and M-x compile. So let's set it up to kill the process of > find-grep-dired as well. It already does. Then we just need to document this convention better. Would you like to try? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-23 4:06 ` Richard Stallman @ 2006-08-29 22:04 ` Juri Linkov 2006-08-30 17:58 ` Richard Stallman 0 siblings, 1 reply; 42+ messages in thread From: Juri Linkov @ 2006-08-29 22:04 UTC (permalink / raw) Cc: schwab, ehud, emacs-devel, lennart.borgman.073 > > I see C-c C-k already has that meaning in the buffers made by M-x grep > > and M-x compile. So let's set it up to kill the process of > > find-grep-dired as well. > > It already does. > > Then we just need to document this convention better. > Would you like to try? Is `C-c C-k' a common key to kill the process? I see it bound to `kill-compilation', `kill-grep', `kill-find', `ps-run-kill', `tex-kill-job' and no more. It is even no available for the buffer where it is very necessary: there is no keybinding to kill the process in the *Async Shell Command*. -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-29 22:04 ` Juri Linkov @ 2006-08-30 17:58 ` Richard Stallman 2006-08-30 21:16 ` Stefan Monnier 2006-08-30 22:46 ` Juri Linkov 0 siblings, 2 replies; 42+ messages in thread From: Richard Stallman @ 2006-08-30 17:58 UTC (permalink / raw) Cc: schwab, ehud, emacs-devel, lennart.borgman.073 I see it bound to `kill-compilation', `kill-grep', `kill-find', `ps-run-kill', `tex-kill-job' and no more. That is a fair number of different modes. It is even no available for the buffer where it is very necessary: there is no keybinding to kill the process in the *Async Shell Command*. Would you like to add a definition for that mode? Meanwhile, as this is becoming a general convention, we might want to move this off of C-c to some other prefix. (Not right now.) But is there a suitable place to move it? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-30 17:58 ` Richard Stallman @ 2006-08-30 21:16 ` Stefan Monnier 2006-08-31 7:43 ` Kim F. Storm 2006-08-31 18:16 ` Richard Stallman 2006-08-30 22:46 ` Juri Linkov 1 sibling, 2 replies; 42+ messages in thread From: Stefan Monnier @ 2006-08-30 21:16 UTC (permalink / raw) Cc: Juri Linkov, schwab, ehud, lennart.borgman.073, emacs-devel > I see it bound to `kill-compilation', `kill-grep', `kill-find', > `ps-run-kill', `tex-kill-job' and no more. > That is a fair number of different modes. > It is even no available for the buffer where it is very necessary: > there is no keybinding to kill the process in the *Async Shell Command*. > Would you like to add a definition for that mode? > Meanwhile, as this is becoming a general convention, we might want to > move this off of C-c to some other prefix. (Not right now.) > But is there a suitable place to move it? I propose C-x since the mnemonic value of the x shape as in "cross it out" sounds pretty obvious. Stefan ;-P ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-30 21:16 ` Stefan Monnier @ 2006-08-31 7:43 ` Kim F. Storm 2006-08-31 18:16 ` Richard Stallman 1 sibling, 0 replies; 42+ messages in thread From: Kim F. Storm @ 2006-08-31 7:43 UTC (permalink / raw) Cc: rms, schwab, emacs-devel, Juri Linkov, lennart.borgman.073, ehud Stefan Monnier <monnier@iro.umontreal.ca> writes: >> Meanwhile, as this is becoming a general convention, we might want to >> move this off of C-c to some other prefix. (Not right now.) >> But is there a suitable place to move it? I think C-c C-k is quite ok (as a conventional binding in process buffers). Contrary to e.g. C-x C-k (which could be used globally), using the C-c prefix clearly indicates that you must switch to the relevant process' buffer before you can kill the process. > > I propose C-x since the mnemonic value of the x shape as in "cross it out" > sounds pretty obvious. Do you suggest C-x C-k ? C-x C-k is a prefix for many keyboard macro related commands. It's been there for a long time now, and to make it useful, it need to be on a C-x C-<something> key. What other key do you suggest for this then? I suggest we leave things where they are (and have been for ages!) -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-30 21:16 ` Stefan Monnier 2006-08-31 7:43 ` Kim F. Storm @ 2006-08-31 18:16 ` Richard Stallman 2006-08-31 18:49 ` David Kastrup 1 sibling, 1 reply; 42+ messages in thread From: Richard Stallman @ 2006-08-31 18:16 UTC (permalink / raw) Cc: juri, schwab, ehud, lennart.borgman.073, emacs-devel I propose C-x since the mnemonic value of the x shape as in "cross it out" sounds pretty obvious. Putting it on the C-x prefix would be fine, but what is the precise command you suggest? ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-31 18:16 ` Richard Stallman @ 2006-08-31 18:49 ` David Kastrup 2006-08-31 23:34 ` Juri Linkov 0 siblings, 1 reply; 42+ messages in thread From: David Kastrup @ 2006-08-31 18:49 UTC (permalink / raw) Cc: schwab, emacs-devel, juri, Stefan Monnier, lennart.borgman.073, ehud Richard Stallman <rms@gnu.org> writes: > I propose C-x since the mnemonic value of the x shape as in > "cross it out" sounds pretty obvious. > > Putting it on the C-x prefix would be fine, but what is the precise > command you suggest? I think he was joking. Anyway, I don't think this should be moved from the C-c prefix since the functionality is associated basically with comint-related buffers, those having an associated user-visible shell process, but not restricted to them. For example, AUCTeX uses C-c C-k too in order to kill an associated process, even though this process is run in a different buffer. I don't think that the functionality "kill any process associated with _this_ buffer" should have a keybinding, in contrast. The relation of such a process with regard to the user interface is more than unclear. I'd strongly recommend C-c C-k as a binding to major mode authors to stop a process run on behalf of the major mode _if_ there is a good case for such a killing, and regardless of whether this process is run in a different buffer or not (for example, for the purpose of capturing output). But I don't think there is a useful global binding in it for this. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-31 18:49 ` David Kastrup @ 2006-08-31 23:34 ` Juri Linkov 2006-09-01 2:10 ` Miles Bader 0 siblings, 1 reply; 42+ messages in thread From: Juri Linkov @ 2006-08-31 23:34 UTC (permalink / raw) Cc: rms, schwab, emacs-devel, monnier, lennart.borgman.073, ehud > I'd strongly recommend C-c C-k as a binding to major mode authors to > stop a process run on behalf of the major mode _if_ there is a good > case for such a killing, and regardless of whether this process is run > in a different buffer or not (for example, for the purpose of > capturing output). Do you know why comint doesn't bind C-c C-k to comint-kill-subjob? Are there any reasons not to do so? -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-31 23:34 ` Juri Linkov @ 2006-09-01 2:10 ` Miles Bader 2006-09-01 23:47 ` Juri Linkov 0 siblings, 1 reply; 42+ messages in thread From: Miles Bader @ 2006-09-01 2:10 UTC (permalink / raw) Cc: rms, schwab, emacs-devel, monnier, lennart.borgman.073, ehud Juri Linkov <juri@jurta.org> writes: > Do you know why comint doesn't bind C-c C-k to comint-kill-subjob? > Are there any reasons not to do so? It's almost always the wrong thing to use, especially for a typical comint process [*], so having a handy binding by default seems like asking for trouble. [*] (1) It send SIGKILL, which is a last-ditch emergency measure, not the way you should ordinarily stop a process (2) Because it sends a _signal_, rather than using pty, it will kill the sub-shell rather than the foreground process, in the case of a shell session (not to mention a telnet session etc). -Miles -- .Numeric stability is probably not all that important when you're guessing. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-09-01 2:10 ` Miles Bader @ 2006-09-01 23:47 ` Juri Linkov 0 siblings, 0 replies; 42+ messages in thread From: Juri Linkov @ 2006-09-01 23:47 UTC (permalink / raw) Cc: rms, schwab, emacs-devel, monnier, lennart.borgman.073, ehud >> Do you know why comint doesn't bind C-c C-k to comint-kill-subjob? >> Are there any reasons not to do so? > > It's almost always the wrong thing to use, especially for a typical > comint process [*], so having a handy binding by default seems like > asking for trouble. > > [*] (1) It send SIGKILL, which is a last-ditch emergency measure, not > the way you should ordinarily stop a process > (2) Because it sends a _signal_, rather than using pty, it will kill > the sub-shell rather than the foreground process, in the case of > a shell session (not to mention a telnet session etc). It could ask for confirmation. Or behave in a similar way as C-g used to stop a running command, i.e. to wait for the process to die, and another C-c C-k again could kill it instantly. -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-30 17:58 ` Richard Stallman 2006-08-30 21:16 ` Stefan Monnier @ 2006-08-30 22:46 ` Juri Linkov 1 sibling, 0 replies; 42+ messages in thread From: Juri Linkov @ 2006-08-30 22:46 UTC (permalink / raw) Cc: schwab, ehud, emacs-devel, lennart.borgman.073 > I see it bound to `kill-compilation', `kill-grep', `kill-find', > `ps-run-kill', `tex-kill-job' and no more. > > That is a fair number of different modes. > > It is even no available for the buffer where it is very necessary: > there is no keybinding to kill the process in the *Async Shell Command*. > > Would you like to add a definition for that mode? *Async Shell Command* is in shell-mode which inherits from comint-mode. comint-mode has the commands `comint-quit-subjob' (C-c C-z), `comint-stop-subjob' (C-c C-\), `comint-interrupt-subjob' (C-c C-c), and `comint-kill-subjob' (not bound to C-c C-k as one would expect!), and none of them works in *Async Shell Command*, because `shell-filter-ctrl-a-ctrl-b' called via `comint-skip-input' fails here. (see bug in emacs-pretest-bug). -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-20 4:32 ` Richard Stallman 2006-08-21 8:56 ` Ehud Karni @ 2006-08-21 9:15 ` Lennart Borgman 2006-08-22 3:09 ` Richard Stallman 1 sibling, 1 reply; 42+ messages in thread From: Lennart Borgman @ 2006-08-21 9:15 UTC (permalink / raw) Cc: emacs-devel 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? > > What is the motive for wanting to stop the process? > What harm does it do to let the process keep running? > On a slow computer it takes a lot of CPU and it can take long time. > Does M-x kill-grep kill the process for find-grep-dired? > If not, I think we should make it work. > kill-find does, but kill-grep is not defined after just find-grep-dired. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-21 9:15 ` Lennart Borgman @ 2006-08-22 3:09 ` Richard Stallman 0 siblings, 0 replies; 42+ messages in thread From: Richard Stallman @ 2006-08-22 3:09 UTC (permalink / raw) Cc: emacs-devel > Does M-x kill-grep kill the process for find-grep-dired? > If not, I think we should make it work. > kill-find does, but kill-grep is not defined after just find-grep-dired. We could certainly have a single kill command to kill the process outputting into the current buffer. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-18 15:20 How to stop find-grep-dired? Lennart Borgman 2006-08-19 4:35 ` Richard Stallman @ 2006-08-19 8:44 ` Andreas Schwab 2006-08-19 10:33 ` Lennart Borgman 1 sibling, 1 reply; 42+ messages in thread From: Andreas Schwab @ 2006-08-19 8:44 UTC (permalink / raw) Cc: Emacs Devel Lennart Borgman <lennart.borgman.073@student.lu.se> writes: > 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.) The standard binding is C-c C-k (kill-find). Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: How to stop find-grep-dired? 2006-08-19 8:44 ` Andreas Schwab @ 2006-08-19 10:33 ` Lennart Borgman 0 siblings, 0 replies; 42+ messages in thread From: Lennart Borgman @ 2006-08-19 10:33 UTC (permalink / raw) Cc: Emacs Devel Andreas Schwab wrote: > Lennart Borgman <lennart.borgman.073@student.lu.se> writes: > > >> 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.) >> > > The standard binding is C-c C-k (kill-find). > Thanks Andreas, I did not know that. Actually I found now that the corresponding command kill-compilation is in the menus if you run grep-find. However kill-find is not in the menus. However I still believe it should be more simple to stop the process. (For a suggestion about how see my other messages on this subject.) ^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2006-09-01 23:47 UTC | newest] Thread overview: 42+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-08-18 15:20 How to stop find-grep-dired? Lennart Borgman 2006-08-19 4:35 ` Richard Stallman 2006-08-19 7:40 ` Lennart Borgman 2006-08-19 7:45 ` David Kastrup 2006-08-19 8:09 ` Lennart Borgman 2006-08-19 8:28 ` David Kastrup 2006-08-19 8:36 ` Lennart Borgman 2006-08-19 8:49 ` David Kastrup 2006-08-19 10:40 ` Lennart Borgman 2006-08-19 10:47 ` David Kastrup 2006-08-19 14:53 ` Lennart Borgman 2006-08-19 15:04 ` David Kastrup 2006-08-19 15:18 ` Lennart Borgman 2006-08-20 4:32 ` Richard Stallman 2006-08-21 18:40 ` Stuart D. Herring 2006-08-21 23:40 ` Lennart Borgman 2006-08-20 4:32 ` Richard Stallman 2006-08-21 8:56 ` Ehud Karni 2006-08-21 9:14 ` Lennart Borgman 2006-08-22 3:09 ` Richard Stallman 2006-08-22 5:44 ` Lennart Borgman 2006-08-22 5:59 ` Drew Adams 2006-08-22 7:21 ` Lennart Borgman 2006-08-22 15:41 ` Richard Stallman 2006-08-22 15:52 ` Andreas Schwab 2006-08-22 16:31 ` Lennart Borgman 2006-08-24 6:12 ` Lennart Borgman 2006-08-23 4:06 ` Richard Stallman 2006-08-29 22:04 ` Juri Linkov 2006-08-30 17:58 ` Richard Stallman 2006-08-30 21:16 ` Stefan Monnier 2006-08-31 7:43 ` Kim F. Storm 2006-08-31 18:16 ` Richard Stallman 2006-08-31 18:49 ` David Kastrup 2006-08-31 23:34 ` Juri Linkov 2006-09-01 2:10 ` Miles Bader 2006-09-01 23:47 ` Juri Linkov 2006-08-30 22:46 ` Juri Linkov 2006-08-21 9:15 ` Lennart Borgman 2006-08-22 3:09 ` Richard Stallman 2006-08-19 8:44 ` Andreas Schwab 2006-08-19 10:33 ` Lennart Borgman
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.