unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
@ 2020-01-29 11:48 Michael Heerdegen
  2020-01-29 13:07 ` Stephen Berman
  0 siblings, 1 reply; 20+ messages in thread
From: Michael Heerdegen @ 2020-01-29 11:48 UTC (permalink / raw)
  To: 39344; +Cc: Sam Steingold


Hello,

since today (master built) when exiting Gnus I get this error:

Debugger entered--Lisp error: (error "Selecting deleted buffer")
  set-buffer(#<killed buffer>)
  (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p 'kill-buffer-hook) (progn (setq kill-buffer-hook nil))))
  (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p 'kill-buffer-hook) (progn (setq kill-buffer-hook nil)))) (let ((buf buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p 'kill-buffer-hook) (progn (setq kill-buffer-hook nil)))) (let ((buf buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((--dolist-tail-- (gnus-buffers))) (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p 'kill-buffer-hook) (progn (setq kill-buffer-hook nil)))) (let ((buf buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  (closure (nnmail-spool-file t) nil "Clear all variables and buffers." (let ((variables (remove 'gnus-format-specs gnus-variable-list))) (while variables (set (car variables) nil) (setq variables (cdr variables)))) (setq gnus-list-of-killed-groups nil gnus-have-read-active-file nil gnus-agent-covered-methods nil gnus-agent-file-loading-local nil gnus-agent-file-loading-cache nil gnus-server-method-cache nil gnus-newsrc-alist nil gnus-group-list nil gnus-newsrc-hashtb nil gnus-killed-list nil gnus-zombie-list nil gnus-killed-hashtb nil gnus-active-hashtb nil gnus-moderated-hashtb nil gnus-description-hashtb nil gnus-current-headers nil gnus-thread-indent-array nil gnus-newsgroup-headers nil gnus-newsgroup-name nil gnus-server-alist nil gnus-group-list-mode nil gnus-opened-servers nil gnus-group-mark-positions nil gnus-newsgroup-data nil gnus-newsgroup-unreads ...) (gnus-shutdown 'gnus) (and gnus-current-startup-file (get-file-buffer gnus-current-startup-file) (kill-buffer (get-file-buffer gnus-current-startup-file))) (gnus-dribble-clear) (if (get-file-buffer (gnus-newsgroup-kill-file nil)) (progn (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil))))) (let ((buf nntp-server-buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (do-auto-save t) (let ((--dolist-tail-- (gnus-buffers))) (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p 'kill-buffer-hook) (progn (setq kill-buffer-hook nil)))) (let ((buf buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (gnus-kill-gnus-frames))()
  apply((closure (nnmail-spool-file t) nil "Clear all variables and buffers." (let ((variables (remove 'gnus-format-specs gnus-variable-list))) (while variables (set (car variables) nil) (setq variables (cdr variables)))) (setq gnus-list-of-killed-groups nil gnus-have-read-active-file nil gnus-agent-covered-methods nil gnus-agent-file-loading-local nil gnus-agent-file-loading-cache nil gnus-server-method-cache nil gnus-newsrc-alist nil gnus-group-list nil gnus-newsrc-hashtb nil gnus-killed-list nil gnus-zombie-list nil gnus-killed-hashtb nil gnus-active-hashtb nil gnus-moderated-hashtb nil gnus-description-hashtb nil gnus-current-headers nil gnus-thread-indent-array nil gnus-newsgroup-headers nil gnus-newsgroup-name nil gnus-server-alist nil gnus-group-list-mode nil gnus-opened-servers nil gnus-group-mark-positions nil gnus-newsgroup-data nil gnus-newsgroup-unreads ...) (gnus-shutdown 'gnus) (and gnus-current-startup-file (get-file-buffer gnus-current-startup-file) (kill-buffer (get-file-buffer gnus-current-startup-file))) (gnus-dribble-clear) (if (get-file-buffer (gnus-newsgroup-kill-file nil)) (progn (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil))))) (let ((buf nntp-server-buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (do-auto-save t) (let ((--dolist-tail-- (gnus-buffers))) (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p ...) (progn ...))) (let ((buf buffer)) (if (gnus-buffer-live-p buf) (progn ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (gnus-kill-gnus-frames)) nil)
  (let ((kill-buffer-query-functions kill-buffer-query-functions)) (remove-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function) (apply f args))
  my-gnus-clear-system-around-ad((closure (nnmail-spool-file t) nil "Clear all variables and buffers." (let ((variables (remove 'gnus-format-specs gnus-variable-list))) (while variables (set (car variables) nil) (setq variables (cdr variables)))) (setq gnus-list-of-killed-groups nil gnus-have-read-active-file nil gnus-agent-covered-methods nil gnus-agent-file-loading-local nil gnus-agent-file-loading-cache nil gnus-server-method-cache nil gnus-newsrc-alist nil gnus-group-list nil gnus-newsrc-hashtb nil gnus-killed-list nil gnus-zombie-list nil gnus-killed-hashtb nil gnus-active-hashtb nil gnus-moderated-hashtb nil gnus-description-hashtb nil gnus-current-headers nil gnus-thread-indent-array nil gnus-newsgroup-headers nil gnus-newsgroup-name nil gnus-server-alist nil gnus-group-list-mode nil gnus-opened-servers nil gnus-group-mark-positions nil gnus-newsgroup-data nil gnus-newsgroup-unreads ...) (gnus-shutdown 'gnus) (and gnus-current-startup-file (get-file-buffer gnus-current-startup-file) (kill-buffer (get-file-buffer gnus-current-startup-file))) (gnus-dribble-clear) (if (get-file-buffer (gnus-newsgroup-kill-file nil)) (progn (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil))))) (let ((buf nntp-server-buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (do-auto-save t) (let ((--dolist-tail-- (gnus-buffers))) (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p ...) (progn ...))) (let ((buf buffer)) (if (gnus-buffer-live-p buf) (progn ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (gnus-kill-gnus-frames)))
  apply(my-gnus-clear-system-around-ad (closure (nnmail-spool-file t) nil "Clear all variables and buffers." (let ((variables (remove 'gnus-format-specs gnus-variable-list))) (while variables (set (car variables) nil) (setq variables (cdr variables)))) (setq gnus-list-of-killed-groups nil gnus-have-read-active-file nil gnus-agent-covered-methods nil gnus-agent-file-loading-local nil gnus-agent-file-loading-cache nil gnus-server-method-cache nil gnus-newsrc-alist nil gnus-group-list nil gnus-newsrc-hashtb nil gnus-killed-list nil gnus-zombie-list nil gnus-killed-hashtb nil gnus-active-hashtb nil gnus-moderated-hashtb nil gnus-description-hashtb nil gnus-current-headers nil gnus-thread-indent-array nil gnus-newsgroup-headers nil gnus-newsgroup-name nil gnus-server-alist nil gnus-group-list-mode nil gnus-opened-servers nil gnus-group-mark-positions nil gnus-newsgroup-data nil gnus-newsgroup-unreads ...) (gnus-shutdown 'gnus) (and gnus-current-startup-file (get-file-buffer gnus-current-startup-file) (kill-buffer (get-file-buffer gnus-current-startup-file))) (gnus-dribble-clear) (if (get-file-buffer (gnus-newsgroup-kill-file nil)) (progn (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil))))) (let ((buf nntp-server-buffer)) (if (gnus-buffer-live-p buf) (progn (kill-buffer buf) (gnus-prune-buffers)))) (do-auto-save t) (let ((--dolist-tail-- (gnus-buffers))) (while --dolist-tail-- (let ((buffer (car --dolist-tail--))) (save-current-buffer (set-buffer buffer) (set-buffer-modified-p nil) (if (local-variable-p ...) (progn ...))) (let ((buf buffer)) (if (gnus-buffer-live-p buf) (progn ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (gnus-kill-gnus-frames)) nil)
  gnus-clear-system()
  gnus-group-exit()
  funcall-interactively(gnus-group-exit)
  call-interactively(gnus-group-exit nil nil)
  command-execute(gnus-group-exit)

Could this be due to

| Make sure that all gnus buffers are killed on exit
| 5ee3c37634f7f8651b2da1f4b611334a2b146928
| Author:     Sam Steingold <sds@gnu.org>
| AuthorDate: Fri Jan 10 13:34:59 2020 -0500

?

AFAICT `my-gnus-clear-system-around-ad' is unrelated, it looks like

--8<---------------cut here---------------start------------->8---
(defun my-gnus-clear-system-around-ad (f &rest args)
              (let ((kill-buffer-query-functions kill-buffer-query-functions))
                (remove-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function)
                (apply f args)))
--8<---------------cut here---------------end--------------->8---

The problem rather seems to be that the return value of (gnus-buffers)
contains killed buffers.

TIA,

Michael.


In GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0)
 of 2020-01-29 built on drachen
Repository revision: c7e3568e9e62146ee68cb97ca970e03576889a28
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12006000
System Description: Debian GNU/Linux bullseye/sid






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  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
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Berman @ 2020-01-29 13:07 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Sam Steingold, 39344

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

On Wed, 29 Jan 2020 12:48:42 +0100 Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Hello,
>
> since today (master built) when exiting Gnus I get this error:
>
> Debugger entered--Lisp error: (error "Selecting deleted buffer")
>   set-buffer(#<killed buffer>)
[...]
> Could this be due to
>
> | Make sure that all gnus buffers are killed on exit
> | 5ee3c37634f7f8651b2da1f4b611334a2b146928
> | Author:     Sam Steingold <sds@gnu.org>
> | AuthorDate: Fri Jan 10 13:34:59 2020 -0500
>
> ?
>
> AFAICT `my-gnus-clear-system-around-ad' is unrelated, it looks like
>
> (defun my-gnus-clear-system-around-ad (f &rest args)
>               (let ((kill-buffer-query-functions kill-buffer-query-functions))
>                 (remove-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function)
>                 (apply f args)))
>
> The problem rather seems to be that the return value of (gnus-buffers)
> contains killed buffers.

I see this too.  The patch below appears to fix it for me, but I don't
know if it's just a workaround.

Steve Berman


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-clear-system patch --]
[-- Type: text/x-patch, Size: 758 bytes --]

diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 1fd2575ea1..5dba7cced7 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -722,11 +722,12 @@ gnus-clear-system
   ;; Kill Gnus buffers.
   (do-auto-save t)
   (dolist (buffer (gnus-buffers))
-    (with-current-buffer buffer
-      (set-buffer-modified-p nil)
-      (when (local-variable-p 'kill-buffer-hook)
-        (setq kill-buffer-hook nil)))
-    (gnus-kill-buffer buffer))
+    (when (buffer-live-p buffer)
+      (with-current-buffer buffer
+	(set-buffer-modified-p nil)
+	(when (local-variable-p 'kill-buffer-hook)
+	  (setq kill-buffer-hook nil)))
+      (gnus-kill-buffer buffer)))
   ;; Remove Gnus frames.
   (gnus-kill-gnus-frames))


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 13:07 ` Stephen Berman
@ 2020-01-29 13:25   ` Robert Pluim
  2020-01-29 13:33     ` Stephen Berman
  0 siblings, 1 reply; 20+ messages in thread
From: Robert Pluim @ 2020-01-29 13:25 UTC (permalink / raw)
  To: Stephen Berman; +Cc: Michael Heerdegen, Sam Steingold, 39344

>>>>> 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'.

Robert





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 13:25   ` Robert Pluim
@ 2020-01-29 13:33     ` Stephen Berman
  2020-01-29 13:42       ` Robert Pluim
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Berman @ 2020-01-29 13:33 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Michael Heerdegen, Sam Steingold, 39344

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'.

Hm, odd, because when I stepped through gnus-clear-system, the error
occurred here:

   ;; Kill Gnus buffers.
   (do-auto-save t)
   (dolist (buffer (gnus-buffers))
     (with-current-buffer buffer   <===

and after adding the buffer-live-p check before that line, the error no
longer occurs.

Steve Berman





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 13:33     ` Stephen Berman
@ 2020-01-29 13:42       ` Robert Pluim
  2020-01-29 13:56         ` Stephen Berman
  2020-01-29 13:58         ` Andreas Schwab
  0 siblings, 2 replies; 20+ messages in thread
From: Robert Pluim @ 2020-01-29 13:42 UTC (permalink / raw)
  To: Stephen Berman; +Cc: Michael Heerdegen, Sam Steingold, 39344

>>>>> 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)
 





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 13:42       ` Robert Pluim
@ 2020-01-29 13:56         ` Stephen Berman
  2020-01-29 14:02           ` Robert Pluim
  2020-01-29 13:58         ` Andreas Schwab
  1 sibling, 1 reply; 20+ messages in thread
From: Stephen Berman @ 2020-01-29 13:56 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Michael Heerdegen, Sam Steingold, 39344

On Wed, 29 Jan 2020 14:42:26 +0100 Robert Pluim <rpluim@gmail.com> wrote:

>>>>>> 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
>     Stephen> <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)

Yes, that seems to fix the problem too.

Steve Berman





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 13:42       ` Robert Pluim
  2020-01-29 13:56         ` Stephen Berman
@ 2020-01-29 13:58         ` Andreas Schwab
  2020-01-29 17:00           ` Michael Heerdegen
  2020-01-29 17:06           ` Sam Steingold
  1 sibling, 2 replies; 20+ messages in thread
From: Andreas Schwab @ 2020-01-29 13:58 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Michael Heerdegen, Sam Steingold, 39344, Stephen Berman

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.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  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
  0 siblings, 2 replies; 20+ messages in thread
From: Robert Pluim @ 2020-01-29 14:02 UTC (permalink / raw)
  To: Stephen Berman; +Cc: Michael Heerdegen, Sam Steingold, 39344

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

    Stephen> Yes, that seems to fix the problem too.

So now all we have to do is figure out why the duplicate entry is
happening (or just apply one of the two patches and get on with our
day :-))

Robert





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 14:02           ` Robert Pluim
@ 2020-01-29 14:20             ` Stephen Berman
  2020-01-29 14:40             ` Andreas Schwab
  1 sibling, 0 replies; 20+ messages in thread
From: Stephen Berman @ 2020-01-29 14:20 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Michael Heerdegen, Sam Steingold, 39344

On Wed, 29 Jan 2020 15:02:09 +0100 Robert Pluim <rpluim@gmail.com> wrote:

>>>>>> On Wed, 29 Jan 2020 14:56:13 +0100, Stephen Berman
> <stephen.berman@gmx.net> said:
>
>     Stephen> Yes, that seems to fix the problem too.
>
> So now all we have to do is figure out why the duplicate entry is
> happening

Or forestall it in gnus-add-buffer as Andreas pondered?

>           (or just apply one of the two patches and get on with our
> day :-))

BTW, gnus-kill-buffer at the end of the dolist looping over gnus-buffers
also checks buffer-live-p, apparently redundantly here (though there are
46 uses of gnus-kill-buffer and I haven't looked to see if they need the
check).  But I'm afraid I have to get on with my day now, so feel free
to patch or further debug...

Steve Berman





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 14:02           ` Robert Pluim
  2020-01-29 14:20             ` Stephen Berman
@ 2020-01-29 14:40             ` Andreas Schwab
  1 sibling, 0 replies; 20+ messages in thread
From: Andreas Schwab @ 2020-01-29 14:40 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Michael Heerdegen, Sam Steingold, 39344, Stephen Berman

On Jan 29 2020, Robert Pluim wrote:

> So now all we have to do is figure out why the duplicate entry is
> happening

See gnus-add-buffer in nnmail-article-group.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 13:58         ` Andreas Schwab
@ 2020-01-29 17:00           ` Michael Heerdegen
  2020-01-29 17:06           ` Sam Steingold
  1 sibling, 0 replies; 20+ messages in thread
From: Michael Heerdegen @ 2020-01-29 17:00 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Robert Pluim, Sam Steingold, 39344, Stephen Berman

Andreas Schwab <schwab@suse.de> writes:

> Perhaps gnus-add-buffer should already deduplicate.

Seems Sam has done that on master.  That fixed the problem for me.
Dunno if there is anything to do for emacs-27.


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  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
  1 sibling, 1 reply; 20+ messages in thread
From: Sam Steingold @ 2020-01-29 17:06 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Michael Heerdegen, Robert Pluim, Stephen Berman, 39344

> * Andreas Schwab <fpujno@fhfr.qr> [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.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-29 17:06           ` Sam Steingold
@ 2020-01-30  9:23             ` Andreas Schwab
  2020-01-30 16:44               ` Michael Heerdegen
  2020-01-30 18:34               ` Sam Steingold
  0 siblings, 2 replies; 20+ messages in thread
From: Andreas Schwab @ 2020-01-30  9:23 UTC (permalink / raw)
  To: Sam Steingold; +Cc: Michael Heerdegen, Robert Pluim, Stephen Berman, 39344

On Jan 29 2020, Sam Steingold wrote:

>> * Andreas Schwab <fpujno@fhfr.qr> [2020-01-29 14:58:34 +0100]:
>>
>> Perhaps gnus-add-buffer should already deduplicate.
>
> gnus-add-buffer cannot add dupes.
>
> I pushed a different fix, thanks.

Didn't you change exactly what I was suggesting?

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  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:34               ` Sam Steingold
  1 sibling, 1 reply; 20+ messages in thread
From: Michael Heerdegen @ 2020-01-30 16:44 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Robert Pluim, Sam Steingold, 39344, Stephen Berman

Andreas Schwab <schwab@suse.de> writes:

> > I pushed a different fix, thanks.
>
> Didn't you change exactly what I was suggesting?
>
> Andreas.

And can this report be closed btw?

Michael.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-30 16:44               ` Michael Heerdegen
@ 2020-01-30 17:23                 ` Eric Abrahamsen
  2020-01-30 18:35                   ` Sam Steingold
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Abrahamsen @ 2020-01-30 17:23 UTC (permalink / raw)
  To: Michael Heerdegen
  Cc: Andreas Schwab, Robert Pluim, Sam Steingold, 39344,
	Stephen Berman

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Andreas Schwab <schwab@suse.de> writes:
>
>> > I pushed a different fix, thanks.
>>
>> Didn't you change exactly what I was suggesting?
>>
>> Andreas.
>
> And can this report be closed btw?

The compilation warnings are still in there...





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-30  9:23             ` Andreas Schwab
  2020-01-30 16:44               ` Michael Heerdegen
@ 2020-01-30 18:34               ` Sam Steingold
  1 sibling, 0 replies; 20+ messages in thread
From: Sam Steingold @ 2020-01-30 18:34 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Michael Heerdegen, Robert Pluim, Stephen Berman, 39344

> * Andreas Schwab <fpujno@fhfr.qr> [2020-01-30 10:23:52 +0100]:
>
> On Jan 29 2020, Sam Steingold wrote:
>
>>> * Andreas Schwab <fpujno@fhfr.qr> [2020-01-29 14:58:34 +0100]:
>>>
>>> Perhaps gnus-add-buffer should already deduplicate.
>>
>> gnus-add-buffer cannot add dupes.
>>
>> I pushed a different fix, thanks.
>
> Didn't you change exactly what I was suggesting?

I don't think so, but I might have mis-read you.


-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://www.memritv.org https://thereligionofpeace.com https://jihadwatch.org
There are two kinds of egotists: 1) Those who admit it  2) The rest of us





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  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
  0 siblings, 2 replies; 20+ messages in thread
From: Sam Steingold @ 2020-01-30 18:35 UTC (permalink / raw)
  To: Eric Abrahamsen
  Cc: Michael Heerdegen, Andreas Schwab, Robert Pluim, Stephen Berman,
	39344

> * Eric Abrahamsen <revp@revpnoenunzfra.arg> [2020-01-30 09:23:35 -0800]:
>
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> Andreas Schwab <schwab@suse.de> writes:
>>
>>> > I pushed a different fix, thanks.
>>>
>> And can this report be closed btw?
>
> The compilation warnings are still in there...

Should also be fixed.

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://jij.org http://islamexposedonline.com https://iris.org.il
Sex is like air.  It's only a big deal if you can't get any.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-01-30 18:35                   ` Sam Steingold
@ 2020-01-30 18:45                     ` Eric Abrahamsen
  2020-02-05 11:34                     ` Michael Heerdegen
  1 sibling, 0 replies; 20+ messages in thread
From: Eric Abrahamsen @ 2020-01-30 18:45 UTC (permalink / raw)
  To: Sam Steingold
  Cc: Michael Heerdegen, Andreas Schwab, Robert Pluim, Stephen Berman,
	39344

Sam Steingold <sds@gnu.org> writes:

>> * Eric Abrahamsen <revp@revpnoenunzfra.arg> [2020-01-30 09:23:35 -0800]:
>>
>> Michael Heerdegen <michael_heerdegen@web.de> writes:
>>
>>> Andreas Schwab <schwab@suse.de> writes:
>>>
>>>> > I pushed a different fix, thanks.
>>>>
>>> And can this report be closed btw?
>>
>> The compilation warnings are still in there...
>
> Should also be fixed.

Looks good to me, thanks.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  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
  1 sibling, 1 reply; 20+ messages in thread
From: Michael Heerdegen @ 2020-02-05 11:34 UTC (permalink / raw)
  To: Sam Steingold
  Cc: Eric Abrahamsen, Andreas Schwab, Robert Pluim, Stephen Berman,
	39344

Sam Steingold <sds@gnu.org> writes:

> >> And can this report be closed btw?
> >
> > The compilation warnings are still in there...
>
> Should also be fixed.

Great.  So we are done, Sam?  Is emacs-27 ok as well?

Thanks,

Michael.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#39344: 28.0.50; Gnus: Selecting deleted buffer
  2020-02-05 11:34                     ` Michael Heerdegen
@ 2020-02-20 13:35                       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 20+ messages in thread
From: Lars Ingebrigtsen @ 2020-02-20 13:35 UTC (permalink / raw)
  To: Michael Heerdegen
  Cc: Sam Steingold, 39344, Eric Abrahamsen, Andreas Schwab,
	Robert Pluim, Stephen Berman

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Great.  So we are done, Sam?  Is emacs-27 ok as well?

Looks OK to me, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-02-20 13:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).