Commit 0d9ea38927ef

Vincent Demeester <vincent@sbr.pm>
2026-01-18 23:34:36
feat(emacs): implement Eisenhower Matrix for task prioritization
- Enable urgent/important categorization with org-mode tags - Provide keyboard-driven quadrant assignment (C-c e) - Add agenda views for all four priority quadrants Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 1740aaf
Changed files (1)
dots
.config
emacs
dots/.config/emacs/init.el
@@ -1581,12 +1581,16 @@ minibuffer, even without explicitly focusing it."
      (:grouptags)
      ("Write" . ?w) ("Code" . ?c)
      (:endgroup)
-     
+
      (:startgroup)
      ("Handsoff" . ?f)
      (:grouptags)
      ("Read" . ?r) ("Watch" . ?W) ("Listen" . ?l)
-     (:endgroup)))
+     (:endgroup)
+
+     ;; Eisenhower Matrix tags
+     ("urgent" . ?u)
+     ("important" . ?i)))
   (org-log-done 'time)
   (org-log-redeadline 'time)
   (org-log-reschedule 'time)
@@ -1681,7 +1685,24 @@ minibuffer, even without explicitly focusing it."
       ((org-agenda-overriding-header "Reviews Scheduled")
        (org-agenda-skip-function 'org-review-agenda-skip)
        (org-agenda-cmp-user-defined 'org-review-compare)
-       (org-agenda-sorting-strategy '(user-defined-down))))))
+       (org-agenda-sorting-strategy '(user-defined-down))))
+
+     ;; Eisenhower Matrix views
+     ("e" "Eisenhower Matrix"
+      ((tags-todo "+urgent+important"
+                  ((org-agenda-overriding-header "Q1: Do First (Urgent & Important)")))
+       (tags-todo "+important-urgent"
+                  ((org-agenda-overriding-header "Q2: Schedule (Important, Not Urgent)")))
+       (tags-todo "+urgent-important"
+                  ((org-agenda-overriding-header "Q3: Delegate (Urgent, Not Important)")))
+       (tags-todo "-urgent-important"
+                  ((org-agenda-overriding-header "Q4: Eliminate (Neither Urgent nor Important)")))))
+
+     ;; Individual Eisenhower quadrants
+     ("1" "Q1: Do First" tags-todo "+urgent+important")
+     ("2" "Q2: Schedule" tags-todo "+important-urgent")
+     ("3" "Q3: Delegate" tags-todo "+urgent-important")
+     ("4" "Q4: Eliminate" tags-todo "-urgent-important")))
   ;; TODO cleanup this list a bit
   (org-agenda-category-icon-alist `(("personal"  ,(list (propertize "🏡")))
 				    ("work"  ,(list (propertize "🏢")))
@@ -1724,7 +1745,8 @@ minibuffer, even without explicitly focusing it."
 	("C-<left>" . org-shiftleft)
 	("C-<right>" . org-shiftright)
 	("C-<up>" . org-shiftup)
-	("C-<down>" . org-shiftdown))
+	("C-<down>" . org-shiftdown)
+	("C-c e" . vde/org-eisenhower-set-tags))
   :config
   ;; Unbind C-, to allow embark-act to work
   (unbind-key "C-," org-mode-map)
@@ -1767,7 +1789,24 @@ minibuffer, even without explicitly focusing it."
 	     (--remove (s-contains? "==readwise=" it))
 	     (--map (format "%s/%s" org-notes-directory it))
 	     (--map `(,it :maxlevel . 3)))
-	    )))
+	    ))
+
+  (defun vde/org-eisenhower-set-tags ()
+    "Quickly set Eisenhower Matrix tags (urgent/important) on current heading."
+    (interactive)
+    (let* ((choices '((?1 . ("+urgent" "+important"))    ; Q1: Do First
+                      (?2 . ("+important" "-urgent"))     ; Q2: Schedule
+                      (?3 . ("+urgent" "-important"))     ; Q3: Delegate
+                      (?4 . ("-urgent" "-important"))     ; Q4: Eliminate
+                      (?u . ("+urgent"))                  ; Just urgent
+                      (?i . ("+important"))               ; Just important
+                      (?c . ("-urgent" "-important"))))   ; Clear both
+           (key (read-char-choice
+                 "Quadrant: [1]Do [2]Schedule [3]Delegate [4]Eliminate | [u]rgent [i]mportant [c]lear: "
+                 '(?1 ?2 ?3 ?4 ?u ?i ?c)))
+           (tags (cdr (assoc key choices))))
+      (dolist (tag tags)
+        (org-toggle-tag (substring tag 1) (if (string-prefix-p "+" tag) 'on 'off))))))
 
 (use-package org-appear
   :hook (org-mode . org-appear-mode))