1
0
Fork 0

[oni-org] Add files with tasks in PARA directories

I'm trying out trying out PARA and these files sometimes have tasks in them.
This commit is contained in:
Tom Willemse 2024-07-01 15:11:25 -07:00
parent e9214ea7e4
commit 89f4dc6234

View file

@ -444,7 +444,24 @@ and not a state update."
(org-roam-db-query (org-roam-db-query
[:select :distinct file :from nodes :where (= todo $s1)] "TODO"))) [: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-tags-todo-honor-ignore-options t)
(setq org-agenda-todo-ignore-scheduled 'future) (setq org-agenda-todo-ignore-scheduled 'future)
(setq org-agenda-restore-windows-after-quit t) (setq org-agenda-restore-windows-after-quit t)