aboutsummaryrefslogtreecommitdiffstats
path: root/oni-org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2024-07-01 15:11:25 -0700
committerGravatar Tom Willemse2024-07-01 15:11:25 -0700
commit89f4dc62348a347ca6d8e0391d33639aef87d965 (patch)
treefee734039375e38b426e99e7e7df08ca9390581a /oni-org
parente9214ea7e4d350011b60cc5866c40516a37c72a8 (diff)
downloademacs-config-89f4dc62348a347ca6d8e0391d33639aef87d965.tar.gz
emacs-config-89f4dc62348a347ca6d8e0391d33639aef87d965.zip
[oni-org] Add files with tasks in PARA directoriesHEADmaster
I'm trying out trying out PARA and these files sometimes have tasks in them.
Diffstat (limited to 'oni-org')
-rw-r--r--oni-org/oni-org.el19
1 files changed, 18 insertions, 1 deletions
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)