[Emacs] Fix evaluation issue of `mu4e-headers-visible-columns' eval
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
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
@ -3225,11 +3225,15 @@
|
|||||||
reason for the email buffer to open below the email directory and not on its
|
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
|
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
|
horizontal. And to make it more readable, the header window will only occupy
|
||||||
40% of Emacs’ frame, the rest will be given to emails.
|
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
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq mu4e-split-view 'vertical
|
(setq mu4e-split-view 'vertical)
|
||||||
mu4e-headers-visible-columns (round (* (frame-total-cols)
|
(add-hook 'mu4e-headers-mode-hook
|
||||||
0.4)))
|
(lambda ()
|
||||||
|
(setq mu4e-headers-visible-columns (round (* (frame-total-cols)
|
||||||
|
0.4)))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
This is the setup I have for my SMTP mail server: I point Emacs’ SMTP
|
This is the setup I have for my SMTP mail server: I point Emacs’ SMTP
|
||||||
|
Loading…
Reference in New Issue
Block a user