diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index c914aea..5653f1a 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2024.0701.144646 +;; Version: 2025.0225.100309 ;; Package-Requires: (oni-yasnippet oni-hydra org org-edna diminish olivetti org-pretty-table) ;; This program is free software; you can redistribute it and/or modify @@ -68,7 +68,7 @@ "The directory where ‘oni-org’ stores its icons.") (defconst oni-org-todo-dir - (expand-file-name "documents/exocortex-novus/tasks" (getenv "HOME")) + (expand-file-name "documents/gtd" (getenv "HOME")) "The directory where all the TODO notes are stored.") (defconst oni-org-todo-inbox-file @@ -453,15 +453,21 @@ and not a state update." (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")) + (expand-file-name "documents/exocortex-novus/projects" (getenv "HOME")) :full) (directory-files - (expand-file-name "documents/exocortex-para/areas" (getenv "HOME")) + (expand-file-name "documents/exocortex-novus/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))) +(defun oni-org-find-task-files () + "Find all files with active tasks in them." + (split-string + (shell-command-to-string + (format "find -L %S \\( -name '.stversions' -o -name '*.sync-conflict-*' -o -name 'tickler.org' \\) -prune -o \\( -type f -name '*.org' \\) -exec grep -l TODO '{}' \\;" + oni-org-todo-dir)) + "\n")) + +(setq org-agenda-files (oni-org-find-task-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)