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

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

[elpa] externals/org-contacts dcd313e66d 021/154: Tags/properties matche


From: ELPA Syncer
Subject: [elpa] externals/org-contacts dcd313e66d 021/154: Tags/properties matcher: Fixed issues with todo-only matches
Date: Fri, 9 Sep 2022 15:58:23 -0400 (EDT)

branch: externals/org-contacts
commit dcd313e66d2e2291485ca9eab8b719f36391fd9b
Author: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Commit: Bastien Guerry <bzg@altern.org>

    Tags/properties matcher: Fixed issues with todo-only matches
    
    lisp/org.el (org-scan-tags): Require todo-only argument, and document
    that it should be the same one set by make-org-tags-matcher.
    Fix documentation to explain that todo-only is really
    not-done-todo-only.
    
    (org-make-tags-matcher): If todo part of matcher starts with /!,
    matcher now always checks that the TODO keyword is present and
    is a not-done state.  This matters e.g. for org-map-entries
    which unlike org-scan-tags does not do its own separate todo-only
    filtering.  Added docs to explain matcher dependencies.
    
    (org-map-entries): Make sure todo-only is correctly passed from
    org-make-tags-matcher to org-scan-tags.
    
    * lisp/org-clock.el: (org-clock-get-table-data): Make sure todo-only
    does not leak when it is set by make-org-tags-macher.
    
    * lisp/org-crypt.el: (org-encrypt-entries, org-decrypt-entries): Make
    sure todo-only is correctly passed from org-make-tags-matcher to
    org-scan-tags.
    
    * contrib/lisp/contacts.el: (org-contacts-filter) : Make sure todo-only
    is correctly passed from org-make-tags-matcher to org-scan-tags.
---
 org-contacts.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index bdd9996564..b6d9e50a7a 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -143,7 +143,8 @@ This overrides `org-email-link-description-format' if set."
 (defun org-contacts-filter (&optional name-match tags-match)
   "Search for a contact maching NAME-MATCH and TAGS-MATCH.
 If both match values are nil, return all contacts."
-  (let ((tags-matcher
+  (let* (todo-only
+       (tags-matcher
          (if tags-match
              (cdr (org-make-tags-matcher tags-match))
            t))
@@ -161,7 +162,8 @@ If both match values are nil, return all contacts."
           (error "File %s is no in `org-mode'" file))
         (org-scan-tags
          '(add-to-list 'markers (set-marker (make-marker) (point)))
-         `(and ,contacts-matcher ,tags-matcher ,name-matcher))))
+         `(and ,contacts-matcher ,tags-matcher ,name-matcher)
+        todo-only)))
     (dolist (marker markers result)
       (org-with-point-at marker
         (add-to-list 'result



reply via email to

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