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

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

[elpa] externals/gnorb b630235 390/449: Gnorb: Tweaks to gnorb-org-extra


From: Stefan Monnier
Subject: [elpa] externals/gnorb b630235 390/449: Gnorb: Tweaks to gnorb-org-extract-mail-tracking
Date: Fri, 27 Nov 2020 23:16:18 -0500 (EST)

branch: externals/gnorb
commit b630235039207ff4f8d1404b967fe9254f1d651c
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Gnorb: Tweaks to gnorb-org-extract-mail-tracking
    
    * packages/gnorb/gnorb-org.el (gnorb-org-extract-mail-tracking): Fix
      gratuitious logicking. Pretend I was going to update the docstring,
      anyway.
---
 gnorb-org.el | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnorb-org.el b/gnorb-org.el
index 324f646..5c2ee61 100644
--- a/gnorb-org.el
+++ b/gnorb-org.el
@@ -252,8 +252,17 @@ See the docstring of `gnorb-org-handle-mail' for details."
    (user-mail-address
     (string-match-p user-mail-address addr))))
 
+;; FIXME: Why did I break this off from
+;; `gnorb-org-extract-mail-stuff'?  It's only called from there, and
+;; it's confusing to have them separate.
 (defun gnorb-org-extract-mail-tracking (assoc-msg-ids &optional arg region)
-
+  "Return tracked mail links for the current Org subtree.
+ASSOC-MSG-IDS is a list of message-ids that have already been
+determined to be tracked by the subtree.  Return the most recent
+of these, as a candidate for composing a reply.  If there are no
+tracked messages, or if ARG (a prefix arg from earlier) is
+non-nil, ignore these tracked ids and instead scan the
+subtree (or REGION) for links, and use those instead."
   (let* ((all-links (gnorb-org-extract-links nil region))
         ;; The latest (by the creation-time registry key) of all the
         ;; tracked messages that were not sent by our user.
@@ -264,8 +273,7 @@ See the docstring of `gnorb-org-handle-mail' for details."
              (cl-remove-if-not
               (lambda (m)
                 (let ((from (car (gnus-registry-get-id-key m 'sender))))
-                  (or (null from)
-                      (null (gnorb-user-address-match-p from)))))
+                  (not (and from (gnorb-user-address-match-p from)))))
               assoc-msg-ids)
              (lambda (r l)
                (time-less-p



reply via email to

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