all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	Sam Steingold <sds@gnu.org>,
	39344@debbugs.gnu.org
Subject: bug#39344: 28.0.50; Gnus: Selecting deleted buffer
Date: Wed, 29 Jan 2020 14:42:26 +0100	[thread overview]
Message-ID: <m28slqgz0d.fsf@gmail.com> (raw)
In-Reply-To: <87h80e9ylb.fsf@gmx.net> (Stephen Berman's message of "Wed, 29 Jan 2020 14:33:20 +0100")

>>>>> On Wed, 29 Jan 2020 14:33:20 +0100, Stephen Berman <stephen.berman@gmx.net> said:

    Stephen> On Wed, 29 Jan 2020 14:25:10 +0100 Robert Pluim <rpluim@gmail.com> wrote:
    >>>>>>> On Wed, 29 Jan 2020 14:07:16 +0100, Stephen Berman
    >> <stephen.berman@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)
 





  reply	other threads:[~2020-01-29 13:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 11:48 bug#39344: 28.0.50; Gnus: Selecting deleted buffer Michael Heerdegen
2020-01-29 13:07 ` Stephen Berman
2020-01-29 13:25   ` Robert Pluim
2020-01-29 13:33     ` Stephen Berman
2020-01-29 13:42       ` Robert Pluim [this message]
2020-01-29 13:56         ` Stephen Berman
2020-01-29 14:02           ` Robert Pluim
2020-01-29 14:20             ` Stephen Berman
2020-01-29 14:40             ` Andreas Schwab
2020-01-29 13:58         ` Andreas Schwab
2020-01-29 17:00           ` Michael Heerdegen
2020-01-29 17:06           ` Sam Steingold
2020-01-30  9:23             ` Andreas Schwab
2020-01-30 16:44               ` Michael Heerdegen
2020-01-30 17:23                 ` Eric Abrahamsen
2020-01-30 18:35                   ` Sam Steingold
2020-01-30 18:45                     ` Eric Abrahamsen
2020-02-05 11:34                     ` Michael Heerdegen
2020-02-20 13:35                       ` Lars Ingebrigtsen
2020-01-30 18:34               ` Sam Steingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m28slqgz0d.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=39344@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=sds@gnu.org \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.