diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index 173f7dc..c914aea 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -444,7 +444,24 @@ and not a state update." (org-roam-db-query [:select :distinct file :from nodes :where (= todo $s1)] "TODO"))) -(setq org-agenda-files (list oni-org-todo-main-file)) +(defun oni-org-para-todo-files () + "Collect all task files from my PARA repository." + (delete nil + (mapcar (lambda (dir) + (cond + ((string-prefix-p "." (file-name-nondirectory dir)) nil) + (t (let ((file-name (expand-file-name "tasks.org" dir))) + (and (file-exists-p file-name) file-name))))) + (append (directory-files + (expand-file-name "documents/exocortex-para/projects" (getenv "HOME")) + :full) + (directory-files + (expand-file-name "documents/exocortex-para/areas" (getenv "HOME")) + :full))))) + +(setq org-agenda-files (append (list oni-org-todo-main-file) + (oni-org-roam-todo-files) + (oni-org-para-todo-files))) (setq org-agenda-tags-todo-honor-ignore-options t) (setq org-agenda-todo-ignore-scheduled 'future) (setq org-agenda-restore-windows-after-quit t)