From dd140cb98a3e45c086f19b09b2601580bd0cbb18 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 9 Feb 2020 18:06:04 +0200 Subject: [PATCH] mu4e-headers: With gnus-view, avoid server calls We can do it directly, since we only need the path to the message. --- mu4e/mu4e-headers.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index ac693ca8..f0dca6a3 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -41,6 +41,9 @@ (eval-when-compile (require 'mu4e-view)) +(declare-function mu4e-view "mu4e-view") +(declare-function mu4e~main-view "mu4e-main") + ;; the headers view (defgroup mu4e-headers nil "Settings for the headers view." @@ -1691,7 +1694,11 @@ window. " (mu4e-error "Cannot get a message view")) (select-window viewwin) (switch-to-buffer (mu4e~headers-get-loading-buf)) - (mu4e~proc-view docid mu4e-view-show-images decrypt))) + ;; note, in the 'gnus' case, we don't need to call the server to get the + ;; body etc., we only need the path which we already have. + (if mu4e-view-use-gnus + (mu4e-view msg) + (mu4e~proc-view docid mu4e-view-show-images decrypt)))) (defun mu4e-headers-rerun-search () "Rerun the search for the last search expression."