aboutsummaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2025-10-21 16:06:23 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2025-10-21 19:41:56 +0200
commitffeda8b736495ba83037a267b270ea785e421a9f (patch)
tree5aa5be20e8d74a123f507e016a82b906e0eeb2dd /.config/emacs/init.el
parentadfafd726c0b8976cd79092d5a6c52984812bc9a (diff)
downloaddotfiles-ffeda8b736495ba83037a267b270ea785e421a9f.tar.gz
dotfiles-ffeda8b736495ba83037a267b270ea785e421a9f.zip
emacs: prefer emails in plain text
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à <mssola@mssola.com>
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r--.config/emacs/init.el9
1 files changed, 9 insertions, 0 deletions
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))