From ffeda8b736495ba83037a267b270ea785e421a9f Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 21 Oct 2025 16:06:23 +0200 Subject: emacs: prefer emails in plain text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Force email apps in GNU Emacs (i.e. mu4e) to "discourage" formats like "text/html" or "text/richtext". This in practice forces email apps to use "text/plain" by default, which is nicer looking in most cases, and I can always switch back to HTML whenever that is not the case. Signed-off-by: Miquel Sabaté Solà --- .config/emacs/init.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 737d8f1..acbf5df 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -737,6 +737,15 @@ (mu4e-trash-folder . "/comsuse/Elements suprimits"))))) ) + ;; Whenever we enter mu4e-view mode, ensure that text/plain is preferred by + ;; default. + (with-eval-after-load "mm-decode" + (if (null mm-discouraged-alternatives) + (progn + (add-to-list 'mm-discouraged-alternatives "text/html") + (add-to-list 'mm-discouraged-alternatives "text/richtext")))) + + ;; And finally call the real deal. (mu4e)) -- cgit v1.2.3