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

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

[elpa] externals/gnorb 0b7c640 074/449: Make use of the multivalued prop


From: Stefan Monnier
Subject: [elpa] externals/gnorb 0b7c640 074/449: Make use of the multivalued property functions
Date: Fri, 27 Nov 2020 23:15:11 -0500 (EST)

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

    Make use of the multivalued property functions
    
    lisp/gnorb-utils.el: (gnorb-trigger-todo-action) When getting/setting
    the gnorb-message-msg-id-key property on entries, use
    the *-multivalued-property convenience functions instead of replicating
    them ourselves.
---
 lisp/gnorb-utils.el | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/lisp/gnorb-utils.el b/lisp/gnorb-utils.el
index 149b281..8b7ebd2 100644
--- a/lisp/gnorb-utils.el
+++ b/lisp/gnorb-utils.el
@@ -129,16 +129,12 @@ the prefix arg."
                        (point-at-bol))
          ret-dest-todo (org-entry-get
                         root-marker "TODO"))
-    (let ((ids (org-entry-get root-marker gnorb-org-msg-id-key))
+    (let ((ids (org-entry-get-multivalued-property
+               root-marker gnorb-org-msg-id-key))
          (sent-id (plist-get gnorb-gnus-sending-message-info :msg-id)))
-      ;; we can use `org-entry-get-multivalued-property' and
-      ;; `org-entry-put-multivalued-property' here.
       (when sent-id
-       (org-entry-put root-marker
-                      gnorb-org-msg-id-key
-                      (if (stringp ids)
-                          (concat ids "," sent-id)
-                        sent-id)))
+       (org-entry-add-to-multivalued-property
+        root-marker gnorb-org-msg-id-key))
       (if (eq action 'note)
          (call-interactively note-func)
        (when (or (and ret-dest-todo



reply via email to

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