aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Benencia <id@rbenencia.name>2023-01-26 11:42:30 -0800
committerRaul Benencia <id@rbenencia.name>2023-01-26 11:43:56 -0800
commiteb94418cd721c839b5149f7a4f2a970a63fb21cf (patch)
tree6391e8950369816c05a05b3eaecfe3fc6d4893a6
parent38907744fa460f78528cc3fbe1d0532286c1ceec (diff)
emacs: improvements in org-agenda
-rw-r--r--.emacs.local.d/modes/org.el77
1 files changed, 69 insertions, 8 deletions
diff --git a/.emacs.local.d/modes/org.el b/.emacs.local.d/modes/org.el
index 067c9d7..b7c78f3 100644
--- a/.emacs.local.d/modes/org.el
+++ b/.emacs.local.d/modes/org.el
@@ -25,7 +25,6 @@
org-pretty-entities nil
org-hide-emphasis-markers t
;; show actually italicized text instead of /italicized text/
- org-agenda-block-separator ""
org-fontify-whole-heading-line t
org-fontify-done-headline t
org-fontify-quote-and-verse-blocks t)
@@ -95,9 +94,10 @@
;; REFILE ;;
-; Targets include this file and any file contributing to the agenda - up to 9 levels deep
-(setq org-refile-targets (quote ((nil :maxlevel . 9)
- (my-org-agenda-files :maxlevel . 9))))
+; Targets include this file and any file contributing to the agenda - up to 3 levels deep
+(setq org-refile-targets
+ '((nil :maxlevel . 3)
+ (org-agenda-files :maxlevel . 3)))
; Exclude DONE state tasks from refile targets
(defun bh/verify-refile-target ()
@@ -113,15 +113,76 @@
(setq org-refile-allow-creating-parent-nodes (quote confirm))
;; AGENDA VIEW ;;
-(setq org-agenda-files my-org-agenda-files)
+;; Based on Prot's config:
+;; https://protesilaos.com/codelog/2021-12-09-emacs-org-block-agenda/
+(setq my-org-agenda-custom-commands
+ `(("A" "Daily agenda and top priority tasks"
+ (
+ (tags-todo "*"
+ ((org-agenda-skip-function '(org-agenda-skip-if nil '(timestamp)))
+ (org-agenda-skip-function
+ `(org-agenda-skip-entry-if
+ 'notregexp ,(format "\\[#%s\\]" (char-to-string org-priority-highest))))
+ (org-agenda-block-separator nil)
+ (org-agenda-overriding-header "šŸ¤” Important tasks without a date")))
+
+ (agenda "" ((org-agenda-time-grid nil)
+ (org-agenda-start-on-weekday nil)
+ (org-agenda-span 1)
+ (org-agenda-show-all-dates nil)
+ (org-scheduled-past-days 365)
+ ;; Excludes today's scheduled items
+ (org-scheduled-delay-days 1)
+ (org-agenda-block-separator nil)
+ (org-agenda-entry-types '(:scheduled))
+ (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
+ (org-agenda-day-face-function (lambda (date) 'org-agenda-date))
+ (org-agenda-format-date "")
+ (org-agenda-overriding-header "\nšŸ“š Pending scheduled tasks")))
+
+ (agenda "" ((org-agenda-span 1)
+ (org-deadline-warning-days 0)
+ (org-agenda-block-separator nil)
+ (org-scheduled-past-days 0)
+ ;; We don't need the `org-agenda-date-today'
+ ;; highlight because that only has a practical
+ ;; utility in multi-day views.
+ (org-agenda-day-face-function (lambda (date) 'org-agenda-date))
+ (org-agenda-format-date "%A %-e %B %Y")
+ (org-agenda-overriding-header "\nšŸ“Œ Today's agenda\n")))
+
+ (agenda "" ((org-agenda-start-on-weekday nil)
+ (org-agenda-start-day nil)
+ (org-agenda-start-day "+1d")
+ (org-agenda-span 3)
+ (org-deadline-warning-days 0)
+ (org-agenda-block-separator nil)
+ (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
+ (org-agenda-overriding-header "\nā° Next three days\n")))
+
+ (agenda "" ((org-agenda-time-grid nil)
+ (org-agenda-start-on-weekday nil)
+ ;; We don't want to replicate the previous section's
+ ;; three days, so we start counting from the day after.
+ (org-agenda-start-day "+4d")
+ (org-agenda-span 14)
+ (org-agenda-show-all-dates nil)
+ (org-deadline-warning-days 0)
+ (org-agenda-block-separator nil)
+ (org-agenda-entry-types '(:deadline))
+ (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
+ (org-agenda-overriding-header "\nšŸ•˜ Upcoming deadlines (+14d)\n")))
+ ))
+ ))
+
+(setq org-agenda-files my-org-agenda-files)
(setq org-agenda-custom-commands my-org-agenda-custom-commands)
;; Do not dim blocked tasks
+(setq org-agenda-compact-blocks nil)
(setq org-agenda-dim-blocked-tasks nil)
-
-;; Compact the block agenda view
-(setq org-agenda-compact-blocks t)
+(setq org-agenda-block-separator 61)
(defun bh/skip-non-archivable-tasks ()
"Skip trees that are not available for archiving"
nihil fit ex nihilo