diff options
| author | Jakob L. Kreuze | 2022-06-16 20:57:10 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2022-06-16 20:57:10 -0400 |
| commit | c472dbab7b8703c3bcc946c77b1ee8408abef3cf (patch) | |
| tree | 71df24dae8c75a9634f40b1521402516632d6f34 | |
| parent | 57578ae5116aa2cce74f08ac4281a72b52e61d2d (diff) | |
[org] New agenda views
And thank god I discovered `org-agenda-entry-types'.
| -rw-r--r-- | lisp/documents.el | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/lisp/documents.el b/lisp/documents.el index e14aac7..969225a 100644 --- a/lisp/documents.el +++ b/lisp/documents.el @@ -211,11 +211,16 @@ Visits LINK, or if LINK names a subdirectory of "%(org-read-date) %^{Payee}"))) - ;; A rather convoluted agenda setup to show me: - ;; - The tasks I've marked as needing to be done today. - ;; - The inbox items I need to process. + ;; A rather convoluted agenda setup, which presents me an option of two + ;; specialized views. + ;; + ;; One is my daily "calendar", which shows ;; - My daily habits (implemented as recurring Org TODO's). ;; - A view of deadlines and scheduled items for the week ahead. + ;; + ;; The other is my flexible TODO list, which shows + ;; - All tasks I've marked as needing to be done this week. + ;; - The inbox items I need to process. :init (setq org-agenda-files '("~/Notes/GTD/Habits.org" "~/Notes/GTD/Inbox.org" @@ -223,46 +228,59 @@ Visits LINK, or if LINK names a subdirectory of (let ((entry-done '(lambda () (org-agenda-skip-entry-if 'todo 'done))) - - (subtree-is-habit + (subtree-is-not-calendar-item '(lambda () (let ((subtree-end (save-excursion (org-end-of-subtree t)))) - (if (string= (org-entry-get nil "STYLE") "habit") + (if (or (string= (org-entry-get nil "STYLE") "habit") + (not (org-entry-get nil "SCHEDULED"))) subtree-end nil)))) - (subtree-is-not-habit '(lambda () (let ((subtree-end (save-excursion (org-end-of-subtree t)))) (if (not (string= (org-entry-get nil "STYLE") "habit")) subtree-end nil)))) - (subtree-is-not-inbox '(lambda () (let ((subtree-end (save-excursion (org-end-of-subtree t)))) (if (not (cl-search "Inbox.org" (buffer-name))) subtree-end + nil)))) + (subtree-is-not-flexible + '(lambda () + (let ((subtree-end (save-excursion (org-end-of-subtree t)))) + (if (or (string= (org-entry-get nil "STYLE") "habit") + (not (member (org-entry-get nil "TODO") + '("TODO" "IN-PROGRESS"))) + (org-entry-get nil "SCHEDULED") + (cl-search "Inbox.org" (buffer-name))) + subtree-end nil))))) - (setq org-agenda-custom-commands - `(("d" "Daily" - ((tags "PRIORITY=\"A\"" - ((org-agenda-skip-function ,entry-done) - (org-agenda-overriding-header "Tasks for Today:"))) - (alltodo "" - ((org-agenda-skip-function ,subtree-is-not-inbox) - (org-agenda-overriding-header "Inbox:"))) - (agenda "" + `(("d" "Daily Calendar" + ((agenda "" + ((org-agenda-span 'week) + (org-agenda-skip-function ,subtree-is-not-calendar-item) + (org-agenda-overriding-header "Week Ahead:") + (org-agenda-prefix-format " %i %-12:c%t %l") + (org-agenda-entry-types '(:scheduled*))))) + ((org-agenda-compact-blocks t))) + ("D" "Daily Todo" + ((agenda "" ((org-agenda-span 'day) (org-agenda-skip-function ,subtree-is-not-habit) (org-deadline-warning-days 0) (org-agenda-overriding-header "Habits:"))) - (agenda "" - ((org-agenda-span 'week) - (org-agenda-skip-function ,subtree-is-habit) - (org-agenda-overriding-header "Week Ahead:")))) - ((org-agenda-compact-blocks t))))))) + (alltodo "" + ((org-agenda-span 'week) + (org-agenda-skip-function ,subtree-is-not-flexible) + (org-agenda-overriding-header "Flexible Tasks:"))) + (alltodo "" + ((org-agenda-skip-function ,subtree-is-not-inbox) + (org-agenda-overriding-header "Needs Processing:")))) + ((org-agenda-compact-blocks t) + (org-agenda-overriding-columns-format "%TODO %EFFORT %ITEM %CATEGORY %TAGS")))))) ;; Finctionality to add a `CREATED' property -- I don't need something so ;; intrusive that it inserts it for every heading. I can use my own ;; discretion. |