From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: 34987@debbugs.gnu.org
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>
Subject: bug#34987: 27.0.50; Error after toggling duplicate suppression
Date: Mon, 25 Mar 2019 03:54:01 +0000 [thread overview]
Message-ID: <874l7rip7q.fsf@tcd.ie> (raw)
In-Reply-To: <87pnqfiply.fsf@tcd.ie> (Basil L. Contovounesios's message of "Mon, 25 Mar 2019 03:45:29 +0000")
[-- Attachment #1: Type: text/plain, Size: 109 bytes --]
tags 34987 patch
quit
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Patch to follow.
Here it is:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-Gnus-duplicate-suppression-guards-bug-34987.patch --]
[-- Type: text/x-diff, Size: 1900 bytes --]
From 162c8d12a4614776e0104b6701d27f5b30bf607b Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@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
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
Thanks,
--
Basil
next prev parent reply other threads:[~2019-03-25 3:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 3:45 bug#34987: 27.0.50; Error after toggling duplicate suppression Basil L. Contovounesios
2019-03-25 3:54 ` Basil L. Contovounesios [this message]
2019-04-05 17:43 ` Basil L. Contovounesios
2019-04-09 19:22 ` Eric Abrahamsen
2019-04-09 20:30 ` Basil L. Contovounesios
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=874l7rip7q.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=34987@debbugs.gnu.org \
--cc=eric@ericabrahamsen.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.