|
|
|
@ -2,7 +2,6 @@ |
|
|
|
|
|
|
|
|
|
;;; Commentary: |
|
|
|
|
|
|
|
|
|
;; XXX: update org-agenda-text-search-extra-files when creating and removing projects |
|
|
|
|
|
|
|
|
|
;;; Code: |
|
|
|
|
|
|
|
|
@ -116,6 +115,28 @@ project diary, and updating projectile's cache." |
|
|
|
|
(expand-file-name short-name |
|
|
|
|
projects-main-project-directory))) |
|
|
|
|
|
|
|
|
|
(defun projects--org-files () |
|
|
|
|
"Return all Org Mode files in all known projects, recursively." |
|
|
|
|
(mapcan #'(lambda (dir) |
|
|
|
|
(directory-files-recursively (expand-file-name dir projects-main-project-directory) |
|
|
|
|
".*\\.org" nil)) |
|
|
|
|
(projects-existing-projects))) |
|
|
|
|
|
|
|
|
|
(defvar org-agenda-text-search-extra-files) ; to keep the byte-compiler happy |
|
|
|
|
|
|
|
|
|
(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'." |
|
|
|
|
(require 'org) |
|
|
|
|
(let ((extra-files (make-hash-table :test #'equal))) |
|
|
|
|
(mapc #'(lambda (entry) |
|
|
|
|
(when (stringp entry) |
|
|
|
|
(puthash (file-truename entry) t extra-files))) |
|
|
|
|
org-agenda-text-search-extra-files) |
|
|
|
|
(cl-remove-if #'(lambda (org-file) |
|
|
|
|
(gethash (file-truename org-file) extra-files nil)) |
|
|
|
|
(projects--org-files)))) |
|
|
|
|
|
|
|
|
|
(provide 'db-projects) |
|
|
|
|
|
|
|
|
|