aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-26 14:28:18 -0500
committerCraig Jennings <c@cjennings.net>2026-05-26 14:28:18 -0500
commit3acdb28ed69ce27aa3cd4086cfe9714fc1074431 (patch)
tree2bb1fa3eaedb824128d91673995be14f27359996 /modules
parent6c7f9ae225b91dee81a04d2271a6648924c0f3cf (diff)
downloaddotemacs-3acdb28ed69ce27aa3cd4086cfe9714fc1074431.tar.gz
dotemacs-3acdb28ed69ce27aa3cd4086cfe9714fc1074431.zip
feat(mail): keep mu4e's main view from deleting the window split
mu4e's main view displays with a display-buffer-full-frame action, which tears down every other window on launch, so opening mu4e from a split collapsed the layout. mu4e's own mu4e-display-buffer docstring points to display-buffer-alist as the supported override. I added an entry routing the *mu4e-main* buffer to the current window (reuse a window already showing it first, then same-window), so launching mu4e in a split keeps the rest of the layout intact. It's registered eagerly rather than inside mu4e's deferred config so it applies on the first launch. Tests cover the entry registration and that the main buffer no longer collapses a split under mu4e's full-frame action.
Diffstat (limited to 'modules')
-rw-r--r--modules/mail-config.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/mail-config.el b/modules/mail-config.el
index a498844e..f71d6eeb 100644
--- a/modules/mail-config.el
+++ b/modules/mail-config.el
@@ -124,6 +124,18 @@ Prompts user for the action when executing."
(autoload 'mu4e "mu4e" "Launch mu4e email client." t)
(keymap-global-set "C-c m" #'mu4e)
+;; mu4e's main view uses a display-buffer-full-frame action (see
+;; mu4e-display-buffer), which deletes the window split on launch. Per that
+;; function's own docstring, the supported way to change it is
+;; display-buffer-alist. Route the main buffer to the current window instead
+;; (reuse a window already showing it first), so launching mu4e in a split
+;; leaves the rest of the layout intact. Registered eagerly rather than in
+;; mu4e's deferred :config so it applies on the first launch.
+(add-to-list 'display-buffer-alist
+ '("\\`\\*mu4e-main\\*\\'"
+ (display-buffer-reuse-window display-buffer-same-window)
+ (inhibit-same-window . nil)))
+
(use-package mu4e
:ensure nil ;; mu4e gets installed by installing 'mu' via the system package manager
:load-path "/usr/share/emacs/site-lisp/mu4e/"