[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased 3beb906 057/118: org-contacts: Use p
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased 3beb906 057/118: org-contacts: Use progress-reporter for cache update message |
Date: |
Fri, 12 Nov 2021 15:37:03 -0500 (EST) |
branch: scratch/org-contacts-rebased
commit 3beb906af1ff783dbb86f4ed2c43320cfb1d21e9
Author: Rodney Lorrimar <rodney@rodney.id.au>
Commit: Carsten Dominik <carsten.dominik@gmail.com>
org-contacts: Use progress-reporter for cache update message
* contrib/lisp/org-contacts.el (org-contacts-db): Use
`make-progress-reporter' instead of `message' for messages. Also
change the sentence to present progressive tense.
---
org-contacts.el | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 84ebc9d..c72e6c0 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -211,22 +211,26 @@ A regexp matching strings of whitespace, `,' and `;'.")
(cdr (org-make-tags-matcher org-contacts-matcher)))
markers result)
(when (org-contacts-db-need-update-p)
- (message "Update Org Contacts Database")
- (dolist (file (org-contacts-files))
- (org-check-agenda-file file)
- (with-current-buffer (org-get-agenda-file-buffer file)
- (unless (eq major-mode 'org-mode)
- (error "File %s is no in `org-mode'" file))
- (org-scan-tags
- '(add-to-list 'markers (set-marker (make-marker) (point)))
- contacts-matcher
- todo-only)))
- (dolist (marker markers result)
- (org-with-point-at marker
- (add-to-list 'result
- (list (org-get-heading t) marker (org-entry-properties
marker 'all)))))
- (setf org-contacts-db result
- org-contacts-last-update (current-time)))
+ (let ((progress-reporter
+ (make-progress-reporter "Updating Org Contacts Database..." 0
(length org-contacts-files)))
+ (i 0))
+ (dolist (file (org-contacts-files))
+ (org-check-agenda-file file)
+ (with-current-buffer (org-get-agenda-file-buffer file)
+ (unless (eq major-mode 'org-mode)
+ (error "File %s is no in `org-mode'" file))
+ (org-scan-tags
+ '(add-to-list 'markers (set-marker (make-marker) (point)))
+ contacts-matcher
+ todo-only))
+ (progress-reporter-update progress-reporter (setq i (1+ i))))
+ (dolist (marker markers result)
+ (org-with-point-at marker
+ (add-to-list 'result
+ (list (org-get-heading t) marker (org-entry-properties
marker 'all)))))
+ (setf org-contacts-db result
+ org-contacts-last-update (current-time))
+ (progress-reporter-done progress-reporter)))
org-contacts-db))
(defun org-contacts-filter (&optional name-match tags-match)
- [elpa] scratch/org-contacts-rebased b2837af 109/118: simplify logic, remove unused variables, switch to lexical binding, (continued)
- [elpa] scratch/org-contacts-rebased b2837af 109/118: simplify logic, remove unused variables, switch to lexical binding, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5174678 116/118: Fix AVATAR property value not exist problem, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 1be8aa9 069/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 9c233be 070/118: Revert "Update copyright years.", Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased fc25530 074/118: contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion functions, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased d3509e4 076/118: contrib/lisp/org-contacts.el: Complete contacts using tags and properties, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6bcb093 079/118: contrib: Fix error messages., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 44968ec 084/118: Make `org-make-tags-matcher' lexical binding friendly, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 034be20 093/118: org-contacts.el: Add new link type "contact:", Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7161351 094/118: contrib/lisp/org-contacts.el: Add stardiviner as the maintainer, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 3beb906 057/118: org-contacts: Use progress-reporter for cache update message,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 0c439a4 102/118: org-contacts.el: Fix store link function does not return link., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased cf0668a 064/118: org-contacts: Provide ordering when using cycle completion, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8e07b36 082/118: contrib: move a few libraries to cl-lib in place of compile-time cl., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 9a80cca 085/118: org-contacts: Register "tel" link, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 3ed6376 086/118: org-agenda: Remove unnecessary visibility modification, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 9f46067 088/118: Deprecate `org-no-warnings' in favor of `with-no-warnings', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8d0ca82 090/118: Update tel link definition, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 58ea7f2 095/118: org-contacts.el: Fix org-store-link error caused by org-contacts, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased dcbbc77 097/118: org-contacts.el: Inherit face from org-link, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased d1365ce 101/118: org-contacts.el: Use `bound-and-true-p' to check (unbound) var, Stefan Monnier, 2021/11/12