emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master d477ca6: Don't let the Gnus summary format group create re


From: Eric Abrahamsen
Subject: [elpa] master d477ca6: Don't let the Gnus summary format group create registry entries
Date: Sat, 1 Apr 2017 15:12:56 -0400 (EDT)

branch: master
commit d477ca65c048c7afba37f393cfd808e5a152dcee
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Don't let the Gnus summary format group create registry entries
    
    * packages/gnorb/gnorb-gnus.el (gnorb-gnus-insert-format-letter-maybe):
      This function was unilaterally creating entries because of its use
      of `gnus-regsitry-get-id-key'. Because it does not respect ignored
      registry groups, we should use lower-level functions that don't
      create an entry where there wasn't one.
---
 packages/gnorb/gnorb-gnus.el | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/packages/gnorb/gnorb-gnus.el b/packages/gnorb/gnorb-gnus.el
index e682391..5a75bc0 100644
--- a/packages/gnorb/gnorb-gnus.el
+++ b/packages/gnorb/gnorb-gnus.el
@@ -749,15 +749,20 @@ option `gnorb-gnus-hint-relevant-article' is non-nil."
 (add-hook 'gnus-select-article-hook 'gnorb-gnus-hint-relevant-message)
 
 (defun gnorb-gnus-insert-format-letter-maybe (header)
-  (if (not (memq (car (gnus-find-method-for-group
-                      gnus-newsgroup-name))
-                '(nnvirtual nnir)))
-      (cond ((gnus-registry-get-id-key
-             (mail-header-message-id header) 'gnorb-ids)
-            gnorb-gnus-summary-tracked-mark)
-           ((gnorb-find-tracked-headings header)
-            gnorb-gnus-summary-mark)
-           (t " "))
+  (if (not (or (gnus-ephemeral-group-p gnus-newsgroup-name)
+              (gnus-virtual-group-p gnus-newsgroup-name)))
+      (let* ((id (mail-header-message-id header))
+            ;; Use lower-level accessor to avoid creating an entry
+            ;; where there wasn't one.  This function doesn't respect
+            ;; ignored registry groups.
+            (entry (nth 1 (assoc id (registry-lookup
+                                     gnus-registry-db
+                                     (list id))))))
+       (cond ((cdr-safe (assq 'gnorb-ids entry))
+              gnorb-gnus-summary-tracked-mark)
+             ((gnorb-find-tracked-headings header)
+              gnorb-gnus-summary-mark)
+             (t " ")))
     " "))
 
 (fset (intern (concat "gnus-user-format-function-"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]