From e58f58b656cff9d9dc0e4b9fa59e236f0431e1b4 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 13 May 2026 16:14:50 -0500 Subject: refactor(org-agenda): extract main-agenda prefix format into a defvar `org-agenda-custom-commands` inlined ` %i %-15:c%?-15t% s` four times across the "d" command's overdue / high-priority / schedule / priority-B blocks. New `cj/--main-agenda-prefix-format` defvar holds the literal once; every block now references the symbol so a format tweak lands in one place. Regression test walks the "d" command's blocks and asserts each `org-agenda-prefix-format` cell resolves to the shared symbol -- a block that silently diverges fails the check. --- todo.org | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 78eb448b..c2d88b2a 100644 --- a/todo.org +++ b/todo.org @@ -70,7 +70,7 @@ Decide whether to (a) leave it asymmetric and let the row fill in as new launchers arrive, (b) move an existing icon down to balance 5/5/2 or similar, or (c) reorganize by category (work / read / chat / play). Surfaced when Telegram landed in Row 3 alone. -** DOING [#A] Org Agenda fixes :bug: +** DONE [#A] Org Agenda fixes :bug: *** 2026-05-13 Wed @ 13:05:21 -0500 Skip CANCELLED entries from main agenda SCHEDULE see the following screenshot /home/cjennings/pictures/screenshots/2026-05-13_071428.png @@ -83,12 +83,20 @@ narrow -- DONE and FAILED scheduled tasks still render. Tests in =tests/test-org-agenda-config-skip-functions.el= (Normal + Boundary) lock in the configuration form on the agenda block and verify the other blocks aren't accidentally carrying the same skip. -*** TODO [#C] Refactor: extract org-agenda-prefix-format literal :refactor: +*** DONE [#C] Refactor: extract org-agenda-prefix-format literal :refactor: =modules/org-agenda-config.el= currently inlines =" %i %-15:c%?-15t% s"= across four blocks of =org-agenda-custom-commands= (overdue, hi-pri, schedule, priority-B). Extract into a defvar (e.g. =cj/--main-agenda-prefix-format=) and reference it from each block. Surfaced during the audit for the CANCELLED-schedule fix. + +Fix: new =cj/--main-agenda-prefix-format= defvar in +=modules/org-agenda-config.el=; all four blocks of the "d" command now +reference the symbol instead of inlining the literal. Regression test +in =tests/test-org-agenda-config-skip-functions.el= walks the blocks +and asserts each =org-agenda-prefix-format= entry resolves to the +shared symbol -- so a future tweak to one block can't silently diverge +from the others. *** 2026-05-13 Wed @ 13:27:39 -0500 Clear dedicated before toggling window split Reproduction steps - open an org file (I was using this projects's todo.org file -- cgit v1.2.3