diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-09 21:04:11 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-09 21:04:11 -0500 |
| commit | c17c455be6a43effc3c6fb8d27ffd95bc96b3d8a (patch) | |
| tree | 7a78ce2373dac3f00357092767168c224819627f /modules/org-agenda-config.el | |
| parent | 04addf42cff28e0099264f3e9a83843ea50286b8 (diff) | |
| download | dotemacs-c17c455be6a43effc3c6fb8d27ffd95bc96b3d8a.tar.gz dotemacs-c17c455be6a43effc3c6fb8d27ffd95bc96b3d8a.zip | |
feat(agenda): add project-filtered agenda view on C-f8
New cj/todo-list-single-project prompts for a project, then shows the
daily agenda scoped to that project's todo.org plus calendars and inbox.
Moved cj/todo-list-all-agenda-files from C-f8 to s-f8.
Diffstat (limited to 'modules/org-agenda-config.el')
| -rw-r--r-- | modules/org-agenda-config.el | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/modules/org-agenda-config.el b/modules/org-agenda-config.el index 36a3c139..f68bb4ca 100644 --- a/modules/org-agenda-config.el +++ b/modules/org-agenda-config.el @@ -28,7 +28,11 @@ ;; - the weekly schedule, including the habit consistency graph ;; - all priority B tasks ;; -;; C-f8 - TASK LIST containing all tasks from all agenda targets. +;; C-f8 - PROJECT AGENDA showing the main agenda filtered to a single project. +;; Prompts for project selection, then shows overdue/hi-pri/schedule/B tasks +;; scoped to that project's todo.org plus all calendars and inbox. +;; +;; s-f8 - TASK LIST containing all tasks from all agenda targets. ;; ;; M-f8 - TASK LIST containing all tasks from just the current org-mode buffer. ;; @@ -184,7 +188,32 @@ files that have project in their filetag." (interactive) (cj/build-org-agenda-list) (org-agenda "a" "t")) -(global-set-key (kbd "C-<f8>") #'cj/todo-list-all-agenda-files) +(global-set-key (kbd "s-<f8>") #'cj/todo-list-all-agenda-files) + +;; ----------------------- Agenda List Single Project -------------------------- +;; an agenda showing the main daily view filtered to a single project. + +(defun cj/todo-list-single-project () + "Display the main agenda filtered to a single project. +Prompts for a project from ~/projects/ (only those containing todo.org), +then shows the daily agenda (overdue, high-pri, schedule, priority B) +scoped to that project's todo.org plus calendars, schedule, and inbox." + (interactive) + (let* ((all-dirs (directory-files projects-dir t "^[^.]")) + (project-dirs (seq-filter + (lambda (dir) + (and (file-directory-p dir) + (file-exists-p (expand-file-name "todo.org" dir)))) + all-dirs)) + (project-names (mapcar #'file-name-nondirectory project-dirs)) + (chosen (completing-read "Project: " project-names nil t)) + (todo-file (expand-file-name "todo.org" + (expand-file-name chosen projects-dir))) + (org-agenda-files (list todo-file + inbox-file schedule-file + gcal-file pcal-file dcal-file))) + (org-agenda "a" "d"))) +(global-set-key (kbd "C-<f8>") #'cj/todo-list-single-project) ;; ------------------------- Agenda List Current Buffer ------------------------ ;; an agenda listing tasks from just the current buffer. |
