By default, mu4e
will attempt to manage the display of its own buffers. For
headers and message views, the variable mu4e-split-view
is mu4e's
built-in way to decide how and where they are shown.
You can control how mu4e
displays its buffers, including the The headers view and the The message view, by customizing mu4e-split-view
. There
are several options available:
horizontal
(this is the default): display the message view below the
header view. Use mu4e-headers-visible-lines
the set the number of
lines shown (default: 8).
vertical
: display the message view on the
right side of the header view. Use mu4e-headers-visible-columns
to set
the number of visible columns (default: 30).
single-window
: single window mode. Single-window mode tries to
minimize mu4e window operations (opening, killing, resizing, etc) and buffer
changes, while still retaining the view and headers buffers. In addition, it
replaces mu4e
’s main view with a minibuffer-prompt containing the same
information.
Note that using a window-returning function for mu4e-split-view
is
no longer supported, instead you can use display-buffer-alist
, see
the section on further display customization.
Some useful key bindings in the split view:
mu4e-select-other-view
, bound to y
However, mu4e
’s display rules are provisional; you can override them
easily by customizing display-buffer-alist
, which governs how Emacs –
and thus mu4e
– must display your buffers.
Let’s look at some examples.
By default mu4e
’s main buffer occupies the complete frame, but this can be
changed to use the current window:
(add-to-list 'display-buffer-alist `(,(regexp-quote mu4e-main-buffer-name) display-buffer-same-window))
You do not need to configure mu4e-split-view
for this to work. In the
absence of explicit rules to the contrary, mu4e
will fall back on the value
you have set in mu4e-split-view
.
Here is an example that displays the headers buffer in a side window to the right. It occupies half of the width of the frame.
(add-to-list 'display-buffer-alist `(,(regexp-quote mu4e-headers-buffer-name) display-buffer-in-side-window (side . right) (window-width . 0.5)))
You can type C-x w s to toggle the side windows to hide or show them at will.
Note that you may need to customize mu4e-view-rendered-hook
as well; by
default it contains mu4e-resize-linked-headers-window
but you can set it
to nil
if you want to handle manually (through
display-buffer-alist
.