From 175948c3d90cc8224836de9a48bd8f04b705a528 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sat, 5 Sep 2020 19:07:46 +0200 Subject: [PATCH] [Emacs] Added minimal width for headers view in mu4e --- org/config/spacemacs.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/org/config/spacemacs.org b/org/config/spacemacs.org index 24f2ea1..18ea17e 100644 --- a/org/config/spacemacs.org +++ b/org/config/spacemacs.org @@ -3228,13 +3228,15 @@ 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 or the window - not taking the entire frame. + not taking the entire frame. It has to have a minimal size though, I’d say 80 + characters is enough for that. #+BEGIN_SRC emacs-lisp (setq mu4e-split-view 'vertical) - (add-hook 'mu4e-view-mode-hook + (add-hook 'mu4e-headers-mode-hook (lambda () - (setq mu4e-headers-visible-columns (round (* (window-width) - 0.4))))) + (setq mu4e-headers-visible-columns (max 80 + (round (* (window-width) + 0.4)))))) #+END_SRC This is the setup I have for my SMTP mail server: I point Emacs’ SMTP