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

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

[elpa] externals/gnorb 1a0cfc7 243/449: Delete duplicates before and aft


From: Stefan Monnier
Subject: [elpa] externals/gnorb 1a0cfc7 243/449: Delete duplicates before and after finding candidates
Date: Fri, 27 Nov 2020 23:15:48 -0500 (EST)

branch: externals/gnorb
commit 1a0cfc7d72686cbc3140e5cb24e3df7858376baa
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Delete duplicates before and after finding candidates
    
    * gnorb-registry.el (gnorb-find-visit-candidates): Cleaner this way,
      plus as we move to allowing multiple correspondences between messages
      and headings, we only want to trigger once per heading.
---
 gnorb-registry.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnorb-registry.el b/gnorb-registry.el
index 71b7f20..0eee32c 100644
--- a/gnorb-registry.el
+++ b/gnorb-registry.el
@@ -118,13 +118,14 @@ relevant to that message."
     (when (stringp ids)
       (setq ids (gnus-extract-references ids)))
     (when gnorb-tracking-enabled
+      (setq ids (delete-dups ids))
       (progn
        (dolist (id ids)
          (when
              (setq sub-val
                    (gnus-registry-get-id-key id 'gnorb-ids))
            (setq ret-val (append sub-val ret-val))))))
-    ret-val))
+    (delete-dups ret-val)))
 
 (defun gnorb-registry-org-id-search (id)
   "Find all messages that have the org ID in their 'gnorb-ids



reply via email to

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