unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Better process-kill-query prompt
@ 2011-09-11  0:46 Lars Magne Ingebrigtsen
  2011-09-11  1:08 ` Óscar Fuentes
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11  0:46 UTC (permalink / raw)
  To: emacs-devel

Would installing the following patch be OK?  It would aid debugging
greatly if people can report back what the name of the buffer is that
Emacs is trying to kill.

=== modified file 'lisp/subr.el'
*** lisp/subr.el	2011-09-05 08:05:01 +0000
--- lisp/subr.el	2011-09-11 00:44:03 +0000
***************
*** 1904,1910 ****
      (or (not process)
          (not (memq (process-status process) '(run stop open listen)))
          (not (process-query-on-exit-flag process))
!         (yes-or-no-p "Buffer has a running process; kill it? "))))
  
  (add-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function)
  
--- 1904,1911 ----
      (or (not process)
          (not (memq (process-status process) '(run stop open listen)))
          (not (process-query-on-exit-flag process))
!         (yes-or-no-p "Buffer \"%s\" has a running process; kill it? "
! 		     (buffer-name)))))
  
  (add-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function)
  



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




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Better process-kill-query prompt
  2011-09-11  0:46 Better process-kill-query prompt Lars Magne Ingebrigtsen
@ 2011-09-11  1:08 ` Óscar Fuentes
  2011-09-11  2:59 ` Eli Zaretskii
  2011-09-11  3:14 ` Stefan Monnier
  2 siblings, 0 replies; 8+ messages in thread
From: Óscar Fuentes @ 2011-09-11  1:08 UTC (permalink / raw)
  To: emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Would installing the following patch be OK?

[snip]

> !         (yes-or-no-p "Buffer \"%s\" has a running process; kill it? "
> ! 		     (buffer-name)))))

This change seems a no-brainer to me. I use some functions for killing
groups of buffers (mostly Compile buffers) and too often that question
pops up and I need to figure out which buffer still has a running
process.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Better process-kill-query prompt
  2011-09-11  0:46 Better process-kill-query prompt Lars Magne Ingebrigtsen
  2011-09-11  1:08 ` Óscar Fuentes
@ 2011-09-11  2:59 ` Eli Zaretskii
  2011-09-11  3:26   ` Lars Magne Ingebrigtsen
  2011-09-11  3:14 ` Stefan Monnier
  2 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-09-11  2:59 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 11 Sep 2011 02:46:05 +0200
> 
> Would installing the following patch be OK?  It would aid debugging
> greatly if people can report back what the name of the buffer is that
> Emacs is trying to kill.

How about mentioning the name of the process as well?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Better process-kill-query prompt
  2011-09-11  0:46 Better process-kill-query prompt Lars Magne Ingebrigtsen
  2011-09-11  1:08 ` Óscar Fuentes
  2011-09-11  2:59 ` Eli Zaretskii
@ 2011-09-11  3:14 ` Stefan Monnier
  2011-09-11  3:31   ` Lars Magne Ingebrigtsen
  2 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-09-11  3:14 UTC (permalink / raw)
  To: emacs-devel

> Would installing the following patch be OK?  It would aid debugging
> greatly if people can report back what the name of the buffer is that
> Emacs is trying to kill.

Sounds OK to me,


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Better process-kill-query prompt
  2011-09-11  2:59 ` Eli Zaretskii
@ 2011-09-11  3:26   ` Lars Magne Ingebrigtsen
  2011-09-11  4:31     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11  3:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> How about mentioning the name of the process as well?

In my experience, the buffer name is usually a lot more helpful, since
they tend to have sensible names, while processes usually have terse,
not very informative names.

And people are used to dealing with buffers, and processes are a bit
more esoteric, I think.

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Better process-kill-query prompt
  2011-09-11  3:14 ` Stefan Monnier
@ 2011-09-11  3:31   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11  3:31 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Sounds OK to me,

Ok; I'm installing the change.

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Better process-kill-query prompt
  2011-09-11  3:26   ` Lars Magne Ingebrigtsen
@ 2011-09-11  4:31     ` Eli Zaretskii
  2011-09-11  4:41       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-09-11  4:31 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 11 Sep 2011 05:26:28 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > How about mentioning the name of the process as well?
> 
> In my experience, the buffer name is usually a lot more helpful

I did say "as well", didn't I?

Some processes run in buffers whose name means nothing, like what
with-temp-buffer creates.  Having the process name (in addition to the
buffer name) could give a clue.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Better process-kill-query prompt
  2011-09-11  4:31     ` Eli Zaretskii
@ 2011-09-11  4:41       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11  4:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> I did say "as well", didn't I?

Yeah, but then the prompt would often be longer than 80 characters.  Not
that that's a catastrophe, but it's nice to keep them shortish, if
possible. 

> Some processes run in buffers whose name means nothing, like what
> with-temp-buffer creates.  Having the process name (in addition to the
> buffer name) could give a clue.

That's true...

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-11  4:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-11  0:46 Better process-kill-query prompt Lars Magne Ingebrigtsen
2011-09-11  1:08 ` Óscar Fuentes
2011-09-11  2:59 ` Eli Zaretskii
2011-09-11  3:26   ` Lars Magne Ingebrigtsen
2011-09-11  4:31     ` Eli Zaretskii
2011-09-11  4:41       ` Lars Magne Ingebrigtsen
2011-09-11  3:14 ` Stefan Monnier
2011-09-11  3:31   ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).