aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-20 15:56:56 -0500
committerCraig Jennings <c@cjennings.net>2026-07-20 15:56:56 -0500
commitd11f3d5a18271ffd8e4b9822988ccc2fd2e0bcde (patch)
tree38b5702037c5911ac8812a7ab3bc50c6b92cb618 /modules
parentdb9353837def65e627cc1dac5c343789d660aa2d (diff)
downloaddotemacs-d11f3d5a18271ffd8e4b9822988ccc2fd2e0bcde.tar.gz
dotemacs-d11f3d5a18271ffd8e4b9822988ccc2fd2e0bcde.zip
fix(agenda): make C-x C-c close the agenda frame, not the daemon
The catch-all denied it before, and letting the global through would be worse: save-buffers-kill-terminal on a make-frame frame has no client to close, so it kills the daemon. Inside the frame the gesture now runs the frame close.
Diffstat (limited to 'modules')
-rw-r--r--modules/org-agenda-frame.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/org-agenda-frame.el b/modules/org-agenda-frame.el
index 8c3659f5..ef541c2f 100644
--- a/modules/org-agenda-frame.el
+++ b/modules/org-agenda-frame.el
@@ -237,6 +237,11 @@ The default binding for every key not on the allowlist."
(define-key map (kbd "r") #'cj/--agenda-frame-safe-redo)
(define-key map (kbd "S-<f8>") #'cj/agenda-frame-toggle)
(define-key map (kbd "C-M-<f8>") #'cj/org-agenda-refresh-files)
+ ;; C-x C-c means "close this frame" here. The global
+ ;; `save-buffers-kill-terminal' must never run in this frame: it was made
+ ;; by `make-frame', not emacsclient, so with no client to close it falls
+ ;; back to killing the daemon itself.
+ (define-key map (kbd "C-x C-c") #'cj/--agenda-frame-close)
;; (d) Input machinery punched through the catch-all. An explicit nil
;; shadows the [t] default in this map, so these fall through to their
;; global bindings. Without the punches, every frame-focus change