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 #110 received at 76969 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: sbaugh <at> janestreet.com, 76969 <at> debbugs.gnu.org
Subject: Re: bug#76969: kill-buffer fails silently when a thread exists where
 it's current
Date: Sat, 09 Aug 2025 15:20:19 +0300
> Date: Fri, 1 Aug 2025 03:01:11 +0300
> Cc: sbaugh <at> janestreet.com, 76969 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> +@var{buffer-disposition} indicates what happens if the thread's current
> +buffer is about to be killed.  If the value is @code{t}, it's not
> +allowed.

I'd say "killing the buffer is not allowed", because "it" might be
ambiguous.

>            Any other value, including nil (which is the default), means
                                        ^^^
@code{nil}

> --- a/src/thread.h
> +++ b/src/thread.h
> @@ -143,6 +143,9 @@ #define lisp_eval_depth (current_thread->m_lisp_eval_depth)
>    struct buffer *m_current_buffer;
>  #define current_buffer (current_thread->m_current_buffer)
>  
> +  /* Decides whether the thread's current buffer can be killed.  */
> +  Lisp_Object buffer_disposition;

I think this change means ABI_VERSION in comp.c should be bumped.

Also, please move this member to before event_object, because the
comment there says:

  /* event_object must be the last Lisp field.  */

which is consistent with how we allocate thread objects:

  struct thread_state *new_thread
    = ALLOCATE_ZEROED_PSEUDOVECTOR (struct thread_state, event_object,
				    PVEC_THREAD);

Finally, this needs a NEWS entry.

With the above nits fixed, please feel free to install, and thanks.




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.