;; See: https://www.gnu.org/software/emacs/manual/html_node/emacs-mime/Display-Customization.html#Display-Customization (setq gnus-inhibit-images t mm-html-inhibit-images t mm-enable-external 'ask mm-discouraged-alternatives '("text/html" "text/richtext" "text/enriched" "image/.*") mailcap-download-directory "/tmp") ;; See: https://github.com/emacs-mirror/emacs/commit/befa9fcaae29a6c9a283ba371c3c5234c7f644eb ;; Gnus ignores `mm-automatic-display' for text/ derived MIME types, this is not mentioned ;; in the docstring. Ideally, Gnus would default to dumb display of inline text and allow ;; the user to explicitly enable fancy MIME-based major-mode auto-triggering / fontification. ;; The default fail-open model that turns any unexpected evaluation bug into a remote exploit ;; triggered by the user simply opening an email is a disaster. ;; This is the only way I found to stop Gnus from enabling major modes on arbitrary input. ;; I'm keeping text/plain, text/html and disabling everything else. ;; TODO: Write my own `mm-inline-text' replacement. (setq mm-automatic-display '("text/plain") mm-inlined-types '("text/plain" "text/html") mm-inline-media-tests `(("text/plain" mm-inline-text identity) ("text/html" mm-inline-text-html ,(lambda (_handle) mm-text-html-renderer)) (".*" ignore identity))) ;; Show buttonized UI elements for PGP signed messages (setq gnus-buttonized-mime-types '("multipart/alternative" "multipart/encrypted" "multipart/signed" ".*/signed" "text/x-org" "text/richtext" "text/enriched"))