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

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

[elpa] externals/gnorb 1cdec4b 086/449: New option gnorb-org-find-candid


From: Stefan Monnier
Subject: [elpa] externals/gnorb 1cdec4b 086/449: New option gnorb-org-find-candidates-match
Date: Fri, 27 Nov 2020 23:15:14 -0500 (EST)

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

    New option gnorb-org-find-candidates-match
    
    lisp/gnorb-org.el: When gnorb-org-find-visit-candidates looks for org
                   headings relevant to the current message, this string
                   can be used as a org-tags-matcher to limit which
                   headings are visited.
---
 lisp/gnorb-org.el | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index 6d20f34..fce23ff 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -100,6 +100,19 @@ as usual for links, subject to the value of
   :group 'gnorb-org
   :type 'symbol)
 
+(defcustom gnorb-org-find-candidates-match nil
+  "When scanning all org files for heading related to an incoming
+message, this option will limit which headings will be offered as
+target candidates. Specifically it will be used as the second
+argument to `org-map-entries', and syntax is the same as that
+used in an agenda tags view.
+
+For instance, to limit candidates to headings with TODOs in
+`gnorb-org-mail-todos', you might use this:
+
+(mapconcat (lambda (s) (format \"+TODO=\\\"%s\\\"\" s)) gnorb-org-mail-todos 
\"|\")"
+  :group 'gnorb-org
+  :type 'symbol)
 
 (defun gnorb-org-contact-link (rec)
   "Prompt for a BBDB record and insert a link to that record at
@@ -450,9 +463,7 @@ values in their `gnorb-org-org-msg-id-key' property."
                                 (append
                                  (org-get-outline-path)
                                  (list (org-get-heading nil t)))))))))
-           nil ;; allow customize here, default to
-               ;; `gnorb-org-mail-todos', but maybe provide a
-               ;; separate option.
+           gnorb-org-find-candidates-match
            'agenda 'archive 'comment)
           ret-val))
     (setq ret-val (delete-dups



reply via email to

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