Forráskód Böngészése

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'.
Nicolas Goaziou 5 éve
szülő
commit
ddfc469a1a
1 módosított fájl, 15 hozzáadás és 11 törlés
  1. 15 11
      lisp/org-id.el

+ 15 - 11
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 " ")))))