GNU bug report logs - #39344
28.0.50; Gnus: Selecting deleted buffer

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Wed, 29 Jan 2020 11:49:02 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Sam Steingold <sds <at> gnu.org>,
 39344 <at> debbugs.gnu.org
Subject: Re: bug#39344: 28.0.50; Gnus: Selecting deleted buffer
Date: Wed, 29 Jan 2020 14:56:13 +0100
On Wed, 29 Jan 2020 14:42:26 +0100 Robert Pluim <rpluim <at> gmail.com> wrote:

>>>>>> On Wed, 29 Jan 2020 14:33:20 +0100, Stephen Berman
>> <stephen.berman <at> gmx.net> said:
>
>     Stephen> On Wed, 29 Jan 2020 14:25:10 +0100 Robert Pluim
>     Stephen> <rpluim <at> gmail.com> wrote:
>     >>>>>>> On Wed, 29 Jan 2020 14:07:16 +0100, Stephen Berman
>     >> <stephen.berman <at> gmx.net> said:
>     Stephen> I see this too.  The patch below appears to fix it for me, but I don't
>     Stephen> know if it's just a workaround.
>     >> 
>     >> That canʼt be right. 'gnus-buffers' already checks 'buffer-live-p'.
>
>     Stephen> Hm, odd, because when I stepped through gnus-clear-system, the error
>     Stephen> occurred here:
>
>     Stephen>    ;; Kill Gnus buffers.
>     Stephen>    (do-auto-save t)
>     Stephen>    (dolist (buffer (gnus-buffers))
>     Stephen>      (with-current-buffer buffer   <===
>
>     Stephen> and after adding the buffer-live-p check before that line, the error no
>     Stephen> longer occurs.
>
> So one of Gnus' buffers is being killed in the middle of that
> dolist. The only way I can see that happening is if the same buffer is
> in there twice, in which case the following would work as well.
>
> diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
> index 6df26b4af8..2fc14c5fff 100644
> --- a/lisp/gnus/gnus.el
> +++ b/lisp/gnus/gnus.el
> @@ -671,7 +671,7 @@ gnus-kill-buffer
>  
>  (defun gnus-buffers ()
>    "Return a list of live Gnus buffers."
> -  (setq gnus-buffers (seq-filter #'buffer-live-p gnus-buffers)))
> +  (setq gnus-buffers (delete-dups (seq-filter #'buffer-live-p gnus-buffers))))
>  
>  (defalias 'gnus-prune-buffers #'gnus-buffers)

Yes, that seems to fix the problem too.

Steve Berman




This bug report was last modified 5 years and 151 days ago.

Previous Next


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