aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-21 18:24:47 -0500
committerCraig Jennings <c@cjennings.net>2026-07-21 18:24:47 -0500
commit59231c40190f200c2272d0275b2d9dc41d34fcef (patch)
treee975612aaaef445c78cd232067e8070478c126bb /modules
parent98dd0dfb24136f82e8f3b800b2fdb2bedd86324b (diff)
downloaddotemacs-59231c40190f200c2272d0275b2d9dc41d34fcef.tar.gz
dotemacs-59231c40190f200c2272d0275b2d9dc41d34fcef.zip
fix: stop M-SPC / M-S-SPC escaping the Full Agenda frame
M-SPC and M-S-SPC (the ai-term agent-swap chords) are bound in the global map, so pressing them inside the read-only frame jumped to ai-term instead of being contained. The frame's [t] catch-all can't deny them: a keymap's default binding doesn't shadow an explicit binding in a lower-priority map. Deny both explicitly in the frame keymap.
Diffstat (limited to 'modules')
-rw-r--r--modules/org-agenda-frame.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/org-agenda-frame.el b/modules/org-agenda-frame.el
index 0d4f599e..1a19cc1b 100644
--- a/modules/org-agenda-frame.el
+++ b/modules/org-agenda-frame.el
@@ -276,6 +276,14 @@ The default binding for every key not on the allowlist."
[mouse-1] [down-mouse-1] [drag-mouse-1]
(kbd "C-h")))
(define-key map key nil))
+ ;; (e) Global chords that would pull focus out of the frame must be
+ ;; denied *explicitly*. The [t] catch-all can't reach them: a keymap's
+ ;; default binding does not shadow an *explicit* binding in a
+ ;; lower-priority map, and these are bound in the global map (M-SPC /
+ ;; M-S-SPC swap ai-term agents). Left to the catch-all, M-SPC follows
+ ;; its global binding and escapes the read-only frame into ai-term.
+ (dolist (key '("M-SPC" "M-S-SPC"))
+ (define-key map (kbd key) #'cj/--agenda-frame-denied-readonly))
;; View-changers get the distinct fixed-view message, not the read-only one.
(dolist (key '("w" "d" "y" "f" "b" "j"))
(define-key map (kbd key) #'cj/--agenda-frame-denied-fixed-view))