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'.
This commit is contained in:
Nicolas Goaziou 2020-07-14 19:07:14 +02:00
parent 91b2398293
commit ddfc469a1a
1 changed files with 15 additions and 11 deletions

View File

@ -491,17 +491,21 @@ When FILES is given, scan also these files."
(let* ((files (let* ((files
(delete-dups (delete-dups
(mapcar #'file-truename (mapcar #'file-truename
(append (cl-remove-if-not
;; Agenda files and all associated archives. ;; Default `org-id-extra-files' value contains
(org-agenda-files t org-id-search-archives) ;; `agenda-archives' symbol.
;; Explicit extra files. #'stringp
(if (symbolp org-id-extra-files) (append
(symbol-value org-id-extra-files) ;; Agenda files and all associated archives.
org-id-extra-files) (org-agenda-files t org-id-search-archives)
;; All files known to have IDs. ;; Explicit extra files.
org-id-files (if (symbolp org-id-extra-files)
;; Additional files from function call. (symbol-value org-id-extra-files)
files)))) org-id-extra-files)
;; All files known to have IDs.
org-id-files
;; Additional files from function call.
files)))))
(nfiles (length files)) (nfiles (length files))
(id-regexp (id-regexp
(rx (seq bol (0+ (any "\t ")) ":ID:" (1+ " ") (not (any " "))))) (rx (seq bol (0+ (any "\t ")) ":ID:" (1+ " ") (not (any " ")))))