Subject: Re: bug#39344: 28.0.50; Gnus: Selecting deleted buffer

From: Sam Steingold <[email-masked]>
Date: Wed, 29 Jan 2020 12:06:46 -0500

> * Andreas Schwab <[email-masked]> [2020-01-29 14:58:34 +0100]:
>
> On Jan 29 2020, Robert Pluim wrote:
>
>> 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)
>
> Perhaps gnus-add-buffer should already deduplicate.

gnus-add-buffer cannot add dupes.

I pushed a different fix, thanks.

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://ffii.org https://thereligionofpeace.com https://iris.org.il
If you know that you know nothing, you know too much.