GNU bug report logs - #43957
remove process-kill-buffer-query-function from kill-buffer-query-functions

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Mon, 12 Oct 2020 14:08:02 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.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 43957 in the body.
You can then email your comments to 43957 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#43957; Package emacs. (Mon, 12 Oct 2020 14:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boruch Baum <boruch_baum <at> gmx.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 12 Oct 2020 14:08:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Emacs Bug Reporting <bug-gnu-emacs <at> gnu.org>
Subject: remove process-kill-buffer-query-function from
 kill-buffer-query-functions
Date: Mon, 12 Oct 2020 10:07:14 -0400
When explicitly killing a shell/eshell or terminal-emulator
ansi-term/term buffer, a user shouldn't have to take an extra step to
respond to the prompt of process-kill-buffer-query-function. In such
cases, the process for which function process-kill-buffer-query-function
is activated is the foreground shell process, so of course the conscious
user intent is to kill it.

One way to implement this is to have the mode entry functions remove the
entry from the buffer-local copy of kill-buffer-query-functions (if
that's an option for that variable). Another possibility is to put the
logic inside function process-kill-buffer-query-function. There may be
other ways. I'm not sure which is preferable so I haven't included a patch.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43957; Package emacs. (Mon, 12 Oct 2020 15:15:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 43957 <at> debbugs.gnu.org
Subject: Re: bug#43957: remove process-kill-buffer-query-function from
 kill-buffer-query-functions
Date: Mon, 12 Oct 2020 18:14:38 +0300
> Date: Mon, 12 Oct 2020 10:07:14 -0400
> From: Boruch Baum <boruch_baum <at> gmx.com>
> 
> When explicitly killing a shell/eshell or terminal-emulator
> ansi-term/term buffer, a user shouldn't have to take an extra step to
> respond to the prompt of process-kill-buffer-query-function. In such
> cases, the process for which function process-kill-buffer-query-function
> is activated is the foreground shell process, so of course the conscious
> user intent is to kill it.

FWIW, I'm not sure an unconditional change in behavior here is TRT.
Killing a buffer doesn't necessarily imply the user is aware that the
process will be killed as well.

I wouldn't object to an opt-in option, though.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43957; Package emacs. (Mon, 12 Oct 2020 19:59:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Boruch Baum <boruch_baum <at> gmx.com>
Cc: 43957 <at> debbugs.gnu.org
Subject: Re: bug#43957: remove process-kill-buffer-query-function from
 kill-buffer-query-functions
Date: Mon, 12 Oct 2020 19:58:34 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> When explicitly killing a shell/eshell or terminal-emulator
>> ansi-term/term buffer, a user shouldn't have to take an extra step to
>> respond to the prompt of process-kill-buffer-query-function. In such
>> cases, the process for which function process-kill-buffer-query-function
>> is activated is the foreground shell process, so of course the conscious
>> user intent is to kill it.
>
> FWIW, I'm not sure an unconditional change in behavior here is TRT.
> Killing a buffer doesn't necessarily imply the user is aware that the
> process will be killed as well.

Indeed.  I for one would find an unconditional change here highly
unsettling.  I often have a bunch of processes running in the background
and can't be bothered to remember which is running in which buffer.
Getting prompted is important so I don't lose any work.

> I wouldn't object to an opt-in option, though.

Agreed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43957; Package emacs. (Sun, 06 Jun 2021 10:54:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 43957 <at> debbugs.gnu.org, Boruch Baum <boruch_baum <at> gmx.com>
Subject: Re: bug#43957: remove process-kill-buffer-query-function from
 kill-buffer-query-functions
Date: Sun, 06 Jun 2021 12:52:53 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> FWIW, I'm not sure an unconditional change in behavior here is TRT.
> Killing a buffer doesn't necessarily imply the user is aware that the
> process will be killed as well.
>
> I wouldn't object to an opt-in option, though.

I think this sounds a bit obscure as a user option, to be honest.  We
already have options covering customisations here.  For instance, if
there's certain process connections a user doesn't care about, they can
write hook functions to set `set-process-query-on-exit-flag' for those
processes.

And for this specific change -- to not ask about the process in the
current buffer when issuing the `C-x C-c' command -- I think the user
could easily write a three line function and put that in
`kill-buffer-query-function' instead of `process-kill-buffer-query-function'.

That is, I feel the range of things a user could want to have happen in
this case is so wide that adding a single
`don't-query-about-the-process-in-the-current-buffer' variable would not
significantly help a large enough group of users.

So I'm closing this bug report.

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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 06 Jun 2021 10:54:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 43957 <at> debbugs.gnu.org and Boruch Baum <boruch_baum <at> gmx.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 06 Jun 2021 10:54:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 289 days ago.

Previous Next


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