summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2020-07-14 19:07:14 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-07-14 19:07:14 +0200
commitddfc469a1a865de7426144e534861ce0d86b5791 (patch)
treefb5decd262d59c6d604110cd2bce3a6ed052e695
parent91b2398293159120b4021e1a6deece1f330c0825 (diff)
downloadorg-mode-ddfc469a1a865de7426144e534861ce0d86b5791.tar.gz
id: Fix error about `agenda-archives'
* lisp/org-id.el (org-id-update-id-locations): Default extra files also include a special symbol. Be sure to remove it before calling `file-truename'.
-rw-r--r--lisp/org-id.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 387d826..f8af529 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -491,17 +491,21 @@ When FILES is given, scan also these files."
(let* ((files
(delete-dups
(mapcar #'file-truename
- (append
- ;; Agenda files and all associated archives.
- (org-agenda-files t org-id-search-archives)
- ;; Explicit extra files.
- (if (symbolp org-id-extra-files)
- (symbol-value org-id-extra-files)
- org-id-extra-files)
- ;; All files known to have IDs.
- org-id-files
- ;; Additional files from function call.
- files))))
+ (cl-remove-if-not
+ ;; Default `org-id-extra-files' value contains
+ ;; `agenda-archives' symbol.
+ #'stringp
+ (append
+ ;; Agenda files and all associated archives.
+ (org-agenda-files t org-id-search-archives)
+ ;; Explicit extra files.
+ (if (symbolp org-id-extra-files)
+ (symbol-value org-id-extra-files)
+ org-id-extra-files)
+ ;; All files known to have IDs.
+ org-id-files
+ ;; Additional files from function call.
+ files)))))
(nfiles (length files))
(id-regexp
(rx (seq bol (0+ (any "\t ")) ":ID:" (1+ " ") (not (any " ")))))