From 89f4dc62348a347ca6d8e0391d33639aef87d965 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 1 Jul 2024 15:11:25 -0700 Subject: [oni-org] Add files with tasks in PARA directories I'm trying out trying out PARA and these files sometimes have tasks in them. --- oni-org/oni-org.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'oni-org/oni-org.el') 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) -- cgit v1.2.3-54-g00ecf