Add linting function for project management

Daniel Borchmann 2020-09-20 16:33:24 +02:00
parent 66da74d63e
commit ce9a2f51eb
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 22 additions and 0 deletions

View File

@ -171,6 +171,28 @@ not have a corresponding bookmark."
;; bookmark yet
(hash-table-values projects)))
(defun projects-lint-projects ()
"Check all known projects for proper configuration.
This includes checking whether all bookmarks are in place and
whether `org-agenda-text-search-extra-files' is set up to search
through all included Org Mode files."
(with-current-buffer (get-buffer-create " *projects lint results*")
(when-let ((unsearched-org-files (projects-find-unsearched-org-files)))
(insert "The following Org Mode files are not included in `org-agenda-text-search-extra-files'; you may want to add them.")
(dolist (file unsearched-org-files)
(insert "\n " file))
(insert "\n\n"))
(when-let ((missing-bookmarks (projects-check-project-diary-bookmarks)))
(insert "The following projects do not have a project diary bookmark: " (apply #'concat missing-bookmarks)))
(display-buffer (current-buffer))))
(provide 'db-projects)
;;; db-projects.el ends here