GNU bug report logs - #11268
Rgrep can get out of hand, so...

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Tue, 17 Apr 2012 22:26:01 UTC

Severity: wishlist

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11268 in the body.
You can then email your comments to 11268 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Tue, 17 Apr 2012 22:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 17 Apr 2012 22:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: Rgrep can get out of hand, so...
Date: Wed, 18 Apr 2012 06:24:45 +0800
Rgrep can cause massive searches.

Killing its buffer won't stop it!

Also it should say what keys to kill it right there at the top.

Indeed, not even (describe-function (quote rgrep)) or (describe-function
(quote grep)) says how to kill a runaway [r]grep.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Wed, 18 Apr 2012 05:41:03 GMT) Full text and rfc822 format available.

Message #8 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: 11268 <at> debbugs.gnu.org
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Wed, 18 Apr 2012 08:28:12 +0300
> Rgrep can cause massive searches.
>
> Killing its buffer won't stop it!
>
> Also it should say what keys to kill it right there at the top.
>
> Indeed, not even (describe-function (quote rgrep)) or (describe-function
> (quote grep)) says how to kill a runaway [r]grep.

You can kill the running grep with `C-c C-k'.

Also when you kill its buffer with `C-x k',
it asks you the question:

  "Buffer "*grep*" has a running process; kill it? (yes or no)"

Just say yes.

If you can't find the buffer where grep runs, use
`M-x list-processes RET' to find the ruinning process.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Wed, 18 Apr 2012 05:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: 11268 <at> debbugs.gnu.org
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Wed, 18 Apr 2012 13:49:02 +0800
JL> You can kill the running grep with `C-c C-k'.
OK that worked this time...
Well at least the docstrings should mention that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Wed, 18 Apr 2012 06:04:02 GMT) Full text and rfc822 format available.

Message #14 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: jidanni <at> jidanni.org
Cc: juri <at> jurta.org, 11268 <at> debbugs.gnu.org
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Wed, 18 Apr 2012 14:03:29 +0800
jidanni <at> jidanni.org writes:

> Well at least the docstrings should mention that.

Fair enough; added.




bug closed, send any further explanations to 11268 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 18 Apr 2012 06:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 07:52:02 GMT) Full text and rfc822 format available.

Message #19 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 11268 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 03:51:15 -0400
>> Well at least the docstrings should mention that.
> Fair enough; added.

Reminds me that I think we should have a global key binding for "kill
the current buffer's process" (which should also work to kill a process
which is conceptually linked to the current buffer but runs in another
hidden buffer, as in the case of *vc-dir*): the rare times that I need
to kill a process, I need to do it ASAP and I always find myself
scrambling around, trying out madly the few key-bindings that come to my
fingers (among which C-c C-c seems like a natural fit, according to my
fingers, although I usually prefer to associate it to things like
`compile', or `send').


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 08:09:02 GMT) Full text and rfc822 format available.

Message #22 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 11268 <at> debbugs.gnu.org, Chong Yidong <cyd <at> gnu.org>
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 16:08:17 +0800
Never ever use two of the same key, e.g., C-c C-c, without
confirmation.

It's not going to cooperate if it is busy anyway, so
I always end up starting a new shell to do killall emacs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 08:30:02 GMT) Full text and rfc822 format available.

Message #25 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 11268 <at> debbugs.gnu.org, Chong Yidong <cyd <at> gnu.org>
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 10:28:53 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>>> Well at least the docstrings should mention that.
>> Fair enough; added.
>
> Reminds me that I think we should have a global key binding for "kill
> the current buffer's process"

C-c C-k

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 10:30:02 GMT) Full text and rfc822 format available.

Message #28 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 11268 <at> debbugs.gnu.org, Chong Yidong <cyd <at> gnu.org>,
	Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 12:29:10 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

>> Reminds me that I think we should have a global key binding for "kill
>> the current buffer's process"
>
> C-c C-k

That's bound to `message-kill-buffer' in Message mode, and I vaguely
remember that I copied that meaning for the keystroke from somewhere
else...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 14:31:01 GMT) Full text and rfc822 format available.

Message #31 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 11268 <at> debbugs.gnu.org, Chong Yidong <cyd <at> gnu.org>,
	Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 17:28:30 +0300
>>> Reminds me that I think we should have a global key binding for "kill
>>> the current buffer's process"
>>
>> C-c C-k
>
> That's bound to `message-kill-buffer' in Message mode, and I vaguely
> remember that I copied that meaning for the keystroke from somewhere
> else...

Other modes use it for other meanings like `show-branches' in outline.

Maybe `C-x k' is a better key binding.  With a prefix key it could
ask whether to kill the buffer's process, but not kill the buffer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 16:30:02 GMT) Full text and rfc822 format available.

Message #34 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>,
	"'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 11268 <at> debbugs.gnu.org, 'Chong Yidong' <cyd <at> gnu.org>,
	'Andreas Schwab' <schwab <at> linux-m68k.org>
Subject: RE: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 09:28:31 -0700
> Maybe `C-x k' is a better key binding.  With a prefix key it could
> ask whether to kill the buffer's process, but not kill the buffer.

1. `C-x k' should be limited to buffers, of course.  Any prefix arg use should
have something to do with buffers (which your suggestion satisfies).

A disadvantage of your suggestion is that it sacrifices a prefix-key value even
when a buffer has no associated process.

That might be OK if there is a complementary use for buffers that do not have an
associated process.  In that case, (re)use the same prefix-arg value for
something else, specific to such non-process buffers.  Without that possibility,
your suggestion sounds like a waste of a prefix-arg value.

2. There are lots of other things that, like a process, can be associated with a
buffer (e.g., windows).  They too could be competing candidates for the use of a
prefix arg with `C-x k'.

For this reason (#2), and because there are other possible uses of a prefix arg
that are directly related to killing the _buffer_ itself, I think it wise not to
use `C-x k' to kill something associated with a buffer (its process, windows,
local variables,...).  IOW, save `C-x k' for killing buffers.

3. By way of example, this is what the prefix arg does for `C-x k' in Icicle
minor mode:

>0: only buffers visiting files are candidates

<0: only buffers associated with the selected frame are candidates

 0: only buffers that have the same mode as the current buffer are candidates

Something like that makes sense to me for `C-x k': Use the prefix arg to select
classes of buffers that can be completion candidates for killing.  Do not use it
to select other things to kill, even if they are associated with a buffer.

4. If we do decide to bind a key for killing a process it should not be a key
that is either (a) repeatable (by holding it down) or (b) super-easy to type.
Better to reserve such keys for commands that can take advantage of those
qualities.  In addition, we do not want users accidentally killing processes
because the key chosen is too easily hit.

5. If we bind a key for killing a process, I'd suggest that the command provide
for completion among candidate processes.  It is the process that is the target,
not its buffer or some other object, so it should be the process (its
name/identifier) that is offered for completion.

6. I have no opinion about whether we should bind a key globally for killing a
process.  Good keys are in limited supply.  But I agree with Stefan that it is
not always obvious which key to use to kill a given process.

Binding a global key might help in this regard.  But see #5: the process
associated with the current buffer could be the default value, but we should
provide completion for all processes and let the command kill any process
chosen.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 22:27:02 GMT) Full text and rfc822 format available.

Message #37 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'Juri Linkov' <juri <at> jurta.org>, 11268 <at> debbugs.gnu.org,
	'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 'Chong Yidong' <cyd <at> gnu.org>,
	'Andreas Schwab' <schwab <at> linux-m68k.org>
Subject: Re: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 18:25:28 -0400
> Binding a global key might help in this regard.  But see #5: the process
> associated with the current buffer could be the default value, but we should
> provide completion for all processes and let the command kill any process
> chosen.

I could live with a command that requires interaction, but I'd then
override it in my Emacs because when I need this feature, I'm usually in
a real hurry to kill it (as in "no!! I didn't mean that!!") and have no
time for minibuffer completion/selection.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11268; Package emacs. (Thu, 19 Apr 2012 23:23:02 GMT) Full text and rfc822 format available.

Message #40 received at 11268 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 'Juri Linkov' <juri <at> jurta.org>, 11268 <at> debbugs.gnu.org,
	'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 'Chong Yidong' <cyd <at> gnu.org>,
	'Andreas Schwab' <schwab <at> linux-m68k.org>
Subject: RE: bug#11268: Rgrep can get out of hand, so...
Date: Thu, 19 Apr 2012 16:22:18 -0700
> > Binding a global key might help in this regard.  But see 
> > #5: the process associated with the current buffer could
> > be the default value, but we should provide completion
> > for all processes and let the command kill any process
> > chosen.
> 
> I could live with a command that requires interaction, but I'd then
> override it in my Emacs because when I need this feature, I'm 
> usually in a real hurry to kill it (as in "no!! I didn't mean that!!") 
> and have no time for minibuffer completion/selection.

I understand.

(Of course, you only have to hit RET to accept the default of the current
buffer's process.  Still, sometimes a keystroke matters.)





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 May 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 358 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.