aboutsummaryrefslogtreecommitdiffstats
path: root/oni-org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2025-03-06 00:19:02 -0800
committerGravatar Tom Willemse2025-03-06 00:20:01 -0800
commitc47e475dbffdd5e001036a9cc755dd2aec7f3ac6 (patch)
treeb64367f66bdb0c8fb7d6f51b795eb3eadaad232a /oni-org
parentd1b1d772fc75d8ff9976072552a2f4ab2f027a6e (diff)
downloademacs-config-c47e475dbffdd5e001036a9cc755dd2aec7f3ac6.tar.gz
emacs-config-c47e475dbffdd5e001036a9cc755dd2aec7f3ac6.zip
oni-org: Update location of todo files
Diffstat (limited to 'oni-org')
-rw-r--r--oni-org/oni-org.el40
1 files changed, 7 insertions, 33 deletions
diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el
index 5653f1a..23790a0 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: 2025.0225.100309
+;; Version: 2025.0305.221848
;; 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
@@ -76,7 +76,7 @@
"The inbox file for any notes.")
(defconst oni-org-todo-main-file
- (expand-file-name "todo.org" oni-org-todo-dir)
+ (expand-file-name "tasks/todo.org" oni-org-todo-dir)
"The main file for TODO notes.")
(defconst oni-org-todo-someday-file
@@ -87,6 +87,10 @@
(expand-file-name "tickler.org" oni-org-todo-dir)
"The tickler file for TODO notes of the future.")
+(defconst oni-org-todo-events-file
+ (expand-file-name "events.org" oni-org-todo-dir)
+ "The events file for events that don't require any actions.")
+
;;; Functions
(defun oni-org-document-add-inline-images-startup ()
@@ -437,37 +441,7 @@ and not a state update."
("video" . "video-fill.svg")
("album" . "album-fill.svg")))))
-(defun oni-org-roam-todo-files ()
- "Collect all files that have TODO items in them."
- (mapcar
- #'car
- (org-roam-db-query
- [:select :distinct file :from nodes :where (= todo $s1)] "TODO")))
-
-(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-novus/projects" (getenv "HOME"))
- :full)
- (directory-files
- (expand-file-name "documents/exocortex-novus/areas" (getenv "HOME"))
- :full)))))
-
-(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-files (list oni-org-todo-main-file oni-org-todo-events-file))
(setq org-agenda-tags-todo-honor-ignore-options t)
(setq org-agenda-todo-ignore-scheduled 'future)
(setq org-agenda-restore-windows-after-quit t)