[Emacs] Fix evaluation issue of `mu4e-headers-visible-columns' eval
This commit fixes a bug introduced in8c6e622a7c
and69dc8c7d7c
where the mu4e-headers view’s width was set to a dynamic, frame-dependant value that could not be computed with Emacs launched as a headless server. This commit makes this value evaluate when the `mu4e-headers' mode is activated, and hence it should get the correct width of the current frame.
This commit is contained in:
parent
3164af60cc
commit
988596a904
@ -3224,12 +3224,16 @@
|
||||
On modern-day computers, with wide screens almost everywhere, there is no
|
||||
reason for the email buffer to open below the email directory and not on its
|
||||
right, which is why I set the split view to be vertical instead of
|
||||
horizontal. And to make it more readable, the header window will only occupy
|
||||
40% of Emacs’ frame, the rest will be given to emails.
|
||||
horizontal. And to make it more readable, the header window will only occupy
|
||||
40% of Emacs’ frame, the rest will be given to emails. As you can see, the
|
||||
width of the mu4e headers is evaluated each time we enter it, so it can react
|
||||
to the frame being potentially not the same width than earlier.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq mu4e-split-view 'vertical
|
||||
mu4e-headers-visible-columns (round (* (frame-total-cols)
|
||||
0.4)))
|
||||
(setq mu4e-split-view 'vertical)
|
||||
(add-hook 'mu4e-headers-mode-hook
|
||||
(lambda ()
|
||||
(setq mu4e-headers-visible-columns (round (* (frame-total-cols)
|
||||
0.4)))))
|
||||
#+END_SRC
|
||||
|
||||
This is the setup I have for my SMTP mail server: I point Emacs’ SMTP
|
||||
|
Loading…
Reference in New Issue
Block a user