GNU bug report logs - #76969
kill-buffer fails silently when a thread exists where it's current

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Wed, 12 Mar 2025 01:17:01 UTC

Severity: normal

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: dmitry <at> gutov.dev, 76969 <at> debbugs.gnu.org
Subject: Re: bug#76969: kill-buffer fails silently when a thread exists
 where it's current
Date: Thu, 13 Mar 2025 22:38:15 +0200
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  76969 <at> debbugs.gnu.org
> Date: Thu, 13 Mar 2025 16:16:46 -0400
> 
> Note that if you try kill a buffer which is the process-buffer of some
> process:
> 
> - process-kill-buffer-query-function will query the user whether they
>   want to proceed.
> 
> - If the user decides to proceed, then the process in that buffer will
>   simply be killed with SIGHUP.
> 
> Perhaps we should do a similar thing for threads?

That still leaves the issue of what to do if the user says to kill.
The basic problem of being unable to leave a thread without a
current-buffer still stands, and needs to be solved.

> - Add a new kill-buffer-query-functions which checks if the buffer being
>   killed is the current-buffer of any threads, and if so, queries the
>   user if they want to proceed.
> 
> - If the user decides to proceed, then do something like killing the
>   thread with SIGHUP.  Probably call thread-signal on the thread.  We'll
>   still need to switch the thread's current-buffer to a new buffer,
>   since the thread could choose to handle the signal and continue
>   executing.

Same here: these measures don't solve the technical reason why killing
buffers that are current in some other thread was disallowed.




This bug report was last modified 1 day ago.

Previous Next


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