Quickly Switch Between HTML and Plain Text in mu4e

Last updated on December 28, 2024

Mu4e defaults loading messages in HTML with shr. While this works well most of the time, sometimes a plain text version is more readable. Therefore, it is desirable to create a key binding to switch between these two versions.

I have the following in my Emacs configuration:

;; Quickly switching between plain text and HTML mime type.
(keymap-set mu4e-view-mode-map (kbd "K")
            (lambda ()
              (interactive)
              (gnus-article-jump-to-part 1)
              (gnus-article-press-button)
              (gnus-article-press-button)))

This binds key Shift+K to switch between plain text and HTML versions of a message, if the message has both versions available.

This entry was posted in Emacs on by Hong.

About Hong

The maintainer of topbug.net.


Related Content

Our Favorite Fitness Apps for 2025, Tested and Reviewed

Is Sleep’s Dopesmoker still the heaviest album of all time?

Alibaba sells Sun Art Retail stake to PE firm DCP for ~$1.6B, after paying ~$3.6B in 2020 to double the stake to 70%+, as it focuses on its core online business (Bloomberg)

Leave a Comment