Also look into org-agenda-files when checking for missing bookmarks

Daniel Borchmann 2020-09-20 16:35:33 +02:00
parent ce9a2f51eb
commit 2c4cada1da
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 6 additions and 3 deletions

View File

@ -130,18 +130,21 @@ Paths returned are absolute, but may not be canonical."
".*\\.org" nil))
(defvar org-agenda-text-search-extra-files) ; to keep the byte-compiler happy
;; Let's keep the byte compiler happy
(defvar org-agenda-text-search-extra-files)
(defvar org-agenda-files)
(defun projects-find-unsearched-org-files ()
"Find Org Mode files in known projects that are not searched by default.
This is done by checking all org Mode files in every project
whether it is included in `org-agenda-text-search-extra-files'."
whether it is included in `org-agenda-text-search-extra-files' or
in `org-agenda-files'."
(require 'org)
(let ((extra-files (make-hash-table :test #'equal)))
(mapc #'(lambda (entry)
(when (stringp entry)
(puthash (file-truename entry) t extra-files)))
(append org-agenda-files org-agenda-text-search-extra-files))
(cl-remove-if #'(lambda (org-file)
(gethash (file-truename org-file) extra-files nil))