From 47c4b15a58f553e1cc044c6123737bb19aaae228 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Fri, 4 Feb 2022 17:00:54 +0100 Subject: [PATCH] [Emacs] Plaintext emails viewed in writeroom-mode In mu4e, emails in plaintext are viewed in writeroom-mode by default --- org/config/emacs.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org/config/emacs.org b/org/config/emacs.org index 6f74f55..eb6a156 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -1517,6 +1517,12 @@ configuration for the ~mu4e~ package itself. (add-hook 'mu4e-compose-mode-hook (lambda () (use-hard-newlines t 'guess))) (add-hook 'mu4e-compose-mode-hook 'mml-secure-message-sign-pgpmime) + ;; writeroom for plaintext emails + (add-hook 'mu4e-view-mode-hook + (lambda () + (unless (mu4e~message-use-html-p (mu4e-message-at-point) nil) + (writeroom-mode)))) + (setq mu4e-change-filenames-when-moving t mu4e-update-interval 60 mu4e-compose-format-flowed t