aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 01:00:59 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 01:00:59 -0500
commit493b2ee4c8b67f8a980b7645d24a3422b5ff9c10 (patch)
treed4061cc80ae6513e77d545d60a4c7f9a93b70e9d
parent8b4f16367e21f7d19d72564d6aa6cec9a114cdc1 (diff)
downloaddotemacs-493b2ee4c8b67f8a980b7645d24a3422b5ff9c10.tar.gz
dotemacs-493b2ee4c8b67f8a980b7645d24a3422b5ff9c10.zip
feat(org): label the C-; O org prefix in which-key
The C-; O prefix (cj/org-map) had no which-key labels, so the popup just showed raw command names, and nothing at all for the d (finalize-task) binding. I added labels for the whole prefix, including the r/c table sub-prefixes. The two org-show-all bindings are labeled "cancel sparse tree" (S) and "cancel todo tree" (T) so the popup shows what each one cancels rather than two identical "show all" entries.
-rw-r--r--modules/org-config.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/org-config.el b/modules/org-config.el
index fa1ca78eb..a2615b0c9 100644
--- a/modules/org-config.el
+++ b/modules/org-config.el
@@ -419,6 +419,28 @@ gains a date-only CLOSED line."
(keymap-set cj/org-map "d" #'cj/org-finalize-task)
+;; which-key labels for the C-; O org prefix. Registered lazily so this
+;; module's load doesn't depend on which-key being present.
+(with-eval-after-load 'which-key
+ (which-key-add-keymap-based-replacements cj/org-map
+ "n" "narrow to subtree"
+ "N" "widen"
+ ">" "narrow forward"
+ "<" "narrow backward"
+ "s" "sparse tree (match)"
+ "S" "cancel sparse tree"
+ "t" "todo tree"
+ "T" "cancel todo tree"
+ "R" "reveal"
+ "C" "clear element cache"
+ "d" "finalize task (dated)"
+ "r" "table row"
+ "r i" "insert row"
+ "r d" "kill row"
+ "c" "table column"
+ "c i" "insert column"
+ "c d" "delete column"))
+
;; ------------------------------ Org Keybindings ------------------------------
;; which-key labels for org keymaps