aboutsummaryrefslogtreecommitdiff
path: root/modules/org-capture-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-09-22 14:29:33 -0400
committerCraig Jennings <c@cjennings.net>2026-09-22 14:29:33 -0400
commit7c9f92eb0a6751d04a43ffe3cc5f725fce5ab371 (patch)
tree66b997100cfd7067328283e5c7568b1f650cf2a8 /modules/org-capture-config.el
parentbefb206ae7b2daeb61acd20f11aa9d2d5017733f (diff)
downloaddotemacs-7c9f92eb0a6751d04a43ffe3cc5f725fce5ab371.tar.gz
dotemacs-7c9f92eb0a6751d04a43ffe3cc5f725fce5ab371.zip
fix(dirvish): move the sidebar to F9 so F11 toggles fullscreen againHEADmain
Stock Emacs binds F11 to toggle-frame-fullscreen, the key every other application uses for it. This config never rebound it, but dirvish-config's :bind put dirvish-side on F11 and shadowed the stock binding. I moved the sidebar toggle to F9, the free bare F-key: ai-term left it for M-SPC in June and the recording chord came off it today. F2 is the preview key and F5 is reserved for the debug backend, so neither was a candidate. The org-capture F-key guard follows the command rather than the key. F9 joins its list and F11 leaves it, since a fullscreen toggle pops nothing over a capture. The tests pin the new key, the un-shadowed F11, and the guard change.
Diffstat (limited to 'modules/org-capture-config.el')
-rw-r--r--modules/org-capture-config.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/org-capture-config.el b/modules/org-capture-config.el
index b7250f1e..8f5903fe 100644
--- a/modules/org-capture-config.el
+++ b/modules/org-capture-config.el
@@ -145,12 +145,16 @@ re-scanning large target files after the first successful lookup."
:around #'cj/org-capture--set-target-location-advice))
;; --------------------------- Capture F-Key Guard -----------------------------
-;; The global popup keys (F1 dashboard sweep, F10 music, F11 dirvish-side,
+;; The global popup keys (F1 dashboard sweep, F9 dirvish-side, F10 music,
;; F12 terminal, M-SPC agent swap) fire even while a capture is in progress
;; and pop their UI over the capture popup. org-capture-mode is a minor
;; mode active exactly for the capture's duration and its keymap shadows
;; the global map, so blocking the keys there scopes the guard precisely:
;; the moment the capture finalizes or aborts, the keys work again.
+;;
+;; The list follows the command, not the key. F11 was on it while it held
+;; dirvish-side; now that F11 is the frame fullscreen toggle it pops nothing
+;; over a capture and stays usable.
(defun cj/--org-capture-blocked-key ()
"Refuse a global popup key while a capture is in progress."
@@ -160,7 +164,7 @@ re-scanning large target files after the first successful lookup."
(defvar org-capture-mode-map)
(with-eval-after-load 'org-capture
- (dolist (key '("<f1>" "<f10>" "<f11>" "<f12>" "M-SPC"))
+ (dolist (key '("<f1>" "<f9>" "<f10>" "<f12>" "M-SPC"))
(keymap-set org-capture-mode-map key #'cj/--org-capture-blocked-key)))
;; ----------------------- Project-Aware Capture Target ------------------------