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

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

[elpa] externals/gnorb f0cfa7b 191/449: Improvements to gnorb-registry-m


From: Stefan Monnier
Subject: [elpa] externals/gnorb f0cfa7b 191/449: Improvements to gnorb-registry-make-entry
Date: Fri, 27 Nov 2020 23:15:36 -0500 (EST)

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

    Improvements to gnorb-registry-make-entry
    
    * lisp/gnorb-registry.el (gnorb-registry-make-entry): Don't stomp on
      existing key values; always return entry.
---
 lisp/gnorb-registry.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/gnorb-registry.el b/lisp/gnorb-registry.el
index a6c7e05..2fc2d0d 100644
--- a/lisp/gnorb-registry.el
+++ b/lisp/gnorb-registry.el
@@ -74,11 +74,13 @@ sent. Save the relevant Org ids in the 'gnorb-ids key."
       (gnus-registry-set-id-key msg-id 'subject (list subject)))
     (when org-id
       (let ((ids (gnus-registry-get-id-key msg-id 'gnorb-ids)))
-       (gnus-registry-set-id-key msg-id 'gnorb-ids (if (stringp org-id)
-                                                       (cons org-id ids)
-                                                     (append org-id ids)))))
+       (unless (member org-id ids)
+        (gnus-registry-set-id-key msg-id 'gnorb-ids (if (stringp org-id)
+                                                        (cons org-id ids)
+                                                      (append org-id ids))))))
     (when group
-      (gnus-registry-set-id-key msg-id 'group (list group)))))
+      (gnus-registry-set-id-key msg-id 'group (list group)))
+    (gnus-registry-get-or-make-entry msg-id)))
 
 (defun gnorb-registry-capture ()
   "When capturing from a Gnus message, add our new Org heading id



reply via email to

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