From 535e13930d81db17e5afe06b85142c5d97bc5df9 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 13 May 2019 17:27:58 +0200 Subject: emacs: added the "gnus mode toggle" action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attached .eml files are hard to visualize if mu4e-view-use-gnus is not set to true. I've defined a header action because I know I will forget about the name of this variable. Signed-off-by: Miquel Sabaté Solà --- emacs/init.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/emacs/init.org b/emacs/init.org index ef37576..3af3ab1 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -1209,6 +1209,20 @@ These are the defaults: (:subject . nil))) #+END_SRC +Add as a header action to toggle gnus mode for the view mode. I'm doing this +because this is way better to visualize attached .eml emails. + +#+BEGIN_SRC elisp +(defun mssola-toggle-gnus-mode (msg) + "Toggle gnus on view mode from now on." + (if mu4e-view-use-gnus + (setq mu4e-view-use-gnus nil) + (setq mu4e-view-use-gnus t))) + +(add-to-list 'mu4e-headers-actions + '("gnus mode toggle" . mssola-toggle-gnus-mode) t) +#+END_SRC + Show images #+BEGIN_SRC elisp -- cgit v1.2.3