GNU bug report logs - #34987
27.0.50; Error after toggling duplicate suppression

Previous Next

Packages: emacs, gnus;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Mon, 25 Mar 2019 03:46:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 5.13

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34987 in the body.
You can then email your comments to 34987 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to eric <at> ericabrahamsen.net, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#34987; Package emacs,gnus. (Mon, 25 Mar 2019 03:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Basil L. Contovounesios" <contovob <at> tcd.ie>:
New bug report received and forwarded. Copy sent to eric <at> ericabrahamsen.net, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org. (Mon, 25 Mar 2019 03:46:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: submit <at> debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)
Subject: 27.0.50; Error after toggling duplicate suppression
Date: Mon, 25 Mar 2019 03:45:29 +0000
Further to the discussion in bug#34973 and bug#34974, it indeed looks to
me like gnus-suppress-duplicates cannot be enabled only after entering
the summary buffer.  In other words, I see the following:

0. Start Gnus with gnus-suppress-duplicates left at default value of nil
1. Enter summary buffer
2. M-x set-variable RET gnus-suppress-duplicates RET t RET
3. M-u

Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
  remhash("<redacted-message-id>" nil)
  gnus-dup-unsuppress-article(36322)
  gnus-mark-article-as-unread(36322 32)
  gnus-summary-mark-article(nil 32 nil)
  gnus-summary-mark-forward(1 32)
  gnus-summary-clear-mark-forward(1)
  funcall-interactively(gnus-summary-clear-mark-forward 1)
  call-interactively(gnus-summary-clear-mark-forward nil nil)
  command-execute(gnus-summary-clear-mark-forward)

Patch to follow.

Thanks,

-- 
Basil

Gnus v5.13
In GNU Emacs 27.0.50 (build 6, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2019-03-25 built on thunk
Repository revision: 5fdf4fc07df7dd897931efb5dbf5f26dfaff9274
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#34987; Package emacs,gnus. (Mon, 25 Mar 2019 03:55:01 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: 34987 <at> debbugs.gnu.org
Cc: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Subject: Re: bug#34987: 27.0.50; Error after toggling duplicate suppression
Date: Mon, 25 Mar 2019 03:54:01 +0000
[Message part 1 (text/plain, inline)]
tags 34987 patch
quit

"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Patch to follow.

Here it is:

[0001-Fix-Gnus-duplicate-suppression-guards-bug-34987.patch (text/x-diff, inline)]
From 162c8d12a4614776e0104b6701d27f5b30bf607b Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Mon, 25 Mar 2019 02:15:10 +0000
Subject: [PATCH] Fix Gnus duplicate suppression guards (bug#34987)

* lisp/gnus/gnus-dup.el (gnus-dup-enter-articles)
(gnus-dup-suppress-articles): Use gnus-dup-hashtb as an indicator of
initialization instead of gnus-dup-list, which may happen to be nil.
(gnus-dup-unsuppress-article): Do nothing if gnus-dup-hashtb is
uninitialized.
---
 lisp/gnus/gnus-dup.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el
index 8b876489e1..86dbf1a574 100644
--- a/lisp/gnus/gnus-dup.el
+++ b/lisp/gnus/gnus-dup.el
@@ -105,7 +105,7 @@ gnus-dup-save
 
 (defun gnus-dup-enter-articles ()
   "Enter articles from the current group for future duplicate suppression."
-  (unless gnus-dup-list
+  (unless gnus-dup-hashtb
     (gnus-dup-open))
   (setq gnus-dup-list-dirty t)		; mark list for saving
   (let (msgid)
@@ -129,7 +129,7 @@ gnus-dup-enter-articles
 
 (defun gnus-dup-suppress-articles ()
   "Mark duplicate articles as read."
-  (unless gnus-dup-list
+  (unless gnus-dup-hashtb
     (gnus-dup-open))
   (gnus-message 8 "Suppressing duplicates...")
   (let ((auto (and gnus-newsgroup-auto-expire
@@ -149,9 +149,10 @@ gnus-dup-suppress-articles
 
 (defun gnus-dup-unsuppress-article (article)
   "Stop suppression of ARTICLE."
-  (let* ((header (gnus-data-header (gnus-data-find article)))
-	 (id     (when header (mail-header-id header))))
-    (when id
+  (let (header id)
+    (when (and gnus-dup-hashtb
+               (setq header (gnus-data-header (gnus-data-find article)))
+               (setq id (mail-header-id header)))
       (setq gnus-dup-list-dirty t)
       (setq gnus-dup-list (delete id gnus-dup-list))
       (remhash id gnus-dup-hashtb))))
-- 
2.20.1

[Message part 3 (text/plain, inline)]
Thanks,

-- 
Basil

Added tag(s) patch. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Mon, 25 Mar 2019 03:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#34987; Package emacs,gnus. (Fri, 05 Apr 2019 17:44:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: 34987 <at> debbugs.gnu.org
Cc: Eric Abrahamsen <eric <at> ericabrahamsen.net>,
 Katsumi Yamaoka <yamaoka <at> jpl.org>
Subject: Re: bug#34987: 27.0.50; Error after toggling duplicate suppression
Date: Fri, 05 Apr 2019 18:43:03 +0100
[CCing Yamaoka-san due to recent work in this area.]

"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> Patch to follow.
>
> Here it is:
>
> From 162c8d12a4614776e0104b6701d27f5b30bf607b Mon Sep 17 00:00:00 2001
> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
> Date: Mon, 25 Mar 2019 02:15:10 +0000
> Subject: [PATCH] Fix Gnus duplicate suppression guards (bug#34987)
>
> * lisp/gnus/gnus-dup.el (gnus-dup-enter-articles)
> (gnus-dup-suppress-articles): Use gnus-dup-hashtb as an indicator of
> initialization instead of gnus-dup-list, which may happen to be nil.
> (gnus-dup-unsuppress-article): Do nothing if gnus-dup-hashtb is
> uninitialized.
> ---
>  lisp/gnus/gnus-dup.el | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el
> index 8b876489e1..86dbf1a574 100644
> --- a/lisp/gnus/gnus-dup.el
> +++ b/lisp/gnus/gnus-dup.el
> @@ -105,7 +105,7 @@ gnus-dup-save
>  
>  (defun gnus-dup-enter-articles ()
>    "Enter articles from the current group for future duplicate suppression."
> -  (unless gnus-dup-list
> +  (unless gnus-dup-hashtb
>      (gnus-dup-open))
>    (setq gnus-dup-list-dirty t)		; mark list for saving
>    (let (msgid)
> @@ -129,7 +129,7 @@ gnus-dup-enter-articles
>  
>  (defun gnus-dup-suppress-articles ()
>    "Mark duplicate articles as read."
> -  (unless gnus-dup-list
> +  (unless gnus-dup-hashtb
>      (gnus-dup-open))
>    (gnus-message 8 "Suppressing duplicates...")
>    (let ((auto (and gnus-newsgroup-auto-expire
> @@ -149,9 +149,10 @@ gnus-dup-suppress-articles
>  
>  (defun gnus-dup-unsuppress-article (article)
>    "Stop suppression of ARTICLE."
> -  (let* ((header (gnus-data-header (gnus-data-find article)))
> -	 (id     (when header (mail-header-id header))))
> -    (when id
> +  (let (header id)
> +    (when (and gnus-dup-hashtb
> +               (setq header (gnus-data-header (gnus-data-find article)))
> +               (setq id (mail-header-id header)))
>        (setq gnus-dup-list-dirty t)
>        (setq gnus-dup-list (delete id gnus-dup-list))
>        (remhash id gnus-dup-hashtb))))
> -- 
> 2.20.1

Sorry to nag, but I think this is a straightforward enough fix that I
would like to push soon.  WDYT?

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#34987; Package emacs,gnus. (Tue, 09 Apr 2019 19:24:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Katsumi Yamaoka <yamaoka <at> jpl.org>, 34987 <at> debbugs.gnu.org
Subject: Re: bug#34987: 27.0.50; Error after toggling duplicate suppression
Date: Tue, 09 Apr 2019 12:22:54 -0700
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> [CCing Yamaoka-san due to recent work in this area.]
>
> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>>
>>> Patch to follow.
>>
>> Here it is:
>>
>> From 162c8d12a4614776e0104b6701d27f5b30bf607b Mon Sep 17 00:00:00 2001
>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Date: Mon, 25 Mar 2019 02:15:10 +0000
>> Subject: [PATCH] Fix Gnus duplicate suppression guards (bug#34987)
>>
>> * lisp/gnus/gnus-dup.el (gnus-dup-enter-articles)
>> (gnus-dup-suppress-articles): Use gnus-dup-hashtb as an indicator of
>> initialization instead of gnus-dup-list, which may happen to be nil.
>> (gnus-dup-unsuppress-article): Do nothing if gnus-dup-hashtb is
>> uninitialized.
>> ---
>>  lisp/gnus/gnus-dup.el | 11 ++++++-----
>>  1 file changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el
>> index 8b876489e1..86dbf1a574 100644
>> --- a/lisp/gnus/gnus-dup.el
>> +++ b/lisp/gnus/gnus-dup.el
>> @@ -105,7 +105,7 @@ gnus-dup-save
>>  
>>  (defun gnus-dup-enter-articles ()
>>    "Enter articles from the current group for future duplicate suppression."
>> -  (unless gnus-dup-list
>> +  (unless gnus-dup-hashtb
>>      (gnus-dup-open))
>>    (setq gnus-dup-list-dirty t)		; mark list for saving
>>    (let (msgid)
>> @@ -129,7 +129,7 @@ gnus-dup-enter-articles
>>  
>>  (defun gnus-dup-suppress-articles ()
>>    "Mark duplicate articles as read."
>> -  (unless gnus-dup-list
>> +  (unless gnus-dup-hashtb
>>      (gnus-dup-open))
>>    (gnus-message 8 "Suppressing duplicates...")
>>    (let ((auto (and gnus-newsgroup-auto-expire
>> @@ -149,9 +149,10 @@ gnus-dup-suppress-articles
>>  
>>  (defun gnus-dup-unsuppress-article (article)
>>    "Stop suppression of ARTICLE."
>> -  (let* ((header (gnus-data-header (gnus-data-find article)))
>> -	 (id     (when header (mail-header-id header))))
>> -    (when id
>> +  (let (header id)
>> +    (when (and gnus-dup-hashtb
>> +               (setq header (gnus-data-header (gnus-data-find article)))
>> +               (setq id (mail-header-id header)))
>>        (setq gnus-dup-list-dirty t)
>>        (setq gnus-dup-list (delete id gnus-dup-list))
>>        (remhash id gnus-dup-hashtb))))
>> -- 
>> 2.20.1
>
> Sorry to nag, but I think this is a straightforward enough fix that I
> would like to push soon.  WDYT?

Looks fine to me...




Added tag(s) fixed. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Tue, 09 Apr 2019 20:31:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 34987 <at> debbugs.gnu.org and "Basil L. Contovounesios" <contovob <at> tcd.ie> Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Tue, 09 Apr 2019 20:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#34987; Package emacs,gnus. (Tue, 09 Apr 2019 20:31:03 GMT) Full text and rfc822 format available.

Message #23 received at 34987-done <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: Katsumi Yamaoka <yamaoka <at> jpl.org>, 34987-done <at> debbugs.gnu.org
Subject: Re: bug#34987: 27.0.50; Error after toggling duplicate suppression
Date: Tue, 09 Apr 2019 21:30:37 +0100
tags 34987 fixed
close 34987
quit

Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> Sorry to nag, but I think this is a straightforward enough fix that I
>> would like to push soon.  WDYT?
>
> Looks fine to me...

That's all I need. ;)

Pushed to master[1] and am thus closing this bug.

[1: 6cb49922e6]: Fix Gnus duplicate suppression guards (bug#34987)
  2019-04-09 21:29:38 +0100
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6cb49922e63c2523ccdd6e0a6bd72bcfa72c50c6

Thanks,

-- 
Basil




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 08 May 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 352 days ago.

Previous Next


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