[Top][All Lists]

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

[elpa] scratch/org-contacts-rebased 44968ec 084/118: Make `org-make-tags

From: Stefan Monnier
Subject: [elpa] scratch/org-contacts-rebased 44968ec 084/118: Make `org-make-tags-matcher' lexical binding friendly
Date: Fri, 12 Nov 2021 15:37:09 -0500 (EST)

branch: scratch/org-contacts-rebased
commit 44968ec837efe7333aff89b7c559a2da68726034
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    Make `org-make-tags-matcher' lexical binding friendly
    * lisp/org.el (org-make-tags-matcher): Return a function instead of
      a sexp.  Refactor code.
    (org--matcher-tags-todo-only): New variable.  Replace `todo-only'
    dynamic binding.
    (org-scan-tags): Apply changes to `org-make-tags-matcher'.
    (org-map-entries): Use new variable.
    * lisp/org-crypt.el (org-encrypt-entries):
    (org-decrypt-entries): Use new variable.
    * lisp/org-clock.el (org-clock-get-table-data): Apply changes to
    * lisp/org-agenda.el (org-tags-view): Use new variable.
 org-contacts.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index 5001283..3236a7c 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -252,9 +252,8 @@ to dead or no buffer."
 (defun org-contacts-db ()
   "Return the latest Org Contacts Database."
-  (let* (todo-only
-        (contacts-matcher
-         (cdr (org-make-tags-matcher org-contacts-matcher)))
+  (let* ((org--matcher-tags-todo-only nil)
+        (contacts-matcher (cdr (org-make-tags-matcher org-contacts-matcher)))
     (when (org-contacts-db-need-update-p)
       (let ((progress-reporter
@@ -288,10 +287,9 @@ to dead or no buffer."
                (error "File %s is not in `org-mode'" file))
              (setf result
                    (append result
-                           (org-scan-tags
-                            'org-contacts-at-point
-                            contacts-matcher
-                            todo-only)))))
+                           (org-scan-tags 'org-contacts-at-point
+                                          contacts-matcher
+                                          org--matcher-tags-todo-only)))))
          (progress-reporter-update progress-reporter (setq i (1+ i))))
        (setf org-contacts-db result
              org-contacts-last-update (current-time))

reply via email to

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