From d9e0bf7c6f350db1c342d7dc41bcc2b0ff558829 Mon Sep 17 00:00:00 2001 From: Titus von der Malsburg Date: Thu, 2 Jul 2015 18:01:47 -0700 Subject: [PATCH 1/2] mu4e: Added workaround for #417. --- mu4e/mu4e-view.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index a102683e..cf66f06b 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -175,6 +175,8 @@ messages - for example, `mu4e-org'." ;; not, when the policy is 'ask'. we simply assume the user said yes... the ;; alternative would be to ask for each message, encrypted or not. maybe we ;; need an extra policy... + (if-let ((view-buffer (get-buffer "*mu4e-view*"))) + (kill-buffer view-buffer)) (mu4e~proc-view msgid mu4e-view-show-images mu4e-decryption-policy)) (defun mu4e~view-custom-field (msg field) From ccfdf02a23d15c391583b25b5d0d47d848514173 Mon Sep 17 00:00:00 2001 From: Titus von der Malsburg Date: Fri, 3 Jul 2015 10:10:15 -0700 Subject: [PATCH 2/2] mu4e: Avoid if-let. For compatibility with pre-25 Emacs. --- mu4e/mu4e-view.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index cf66f06b..e584bea9 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -175,8 +175,9 @@ messages - for example, `mu4e-org'." ;; not, when the policy is 'ask'. we simply assume the user said yes... the ;; alternative would be to ask for each message, encrypted or not. maybe we ;; need an extra policy... - (if-let ((view-buffer (get-buffer "*mu4e-view*"))) - (kill-buffer view-buffer)) + (let ((view-buffer (get-buffer "*mu4e-view*"))) + (when view-buffer + (kill-buffer view-buffer))) (mu4e~proc-view msgid mu4e-view-show-images mu4e-decryption-policy)) (defun mu4e~view-custom-field (msg field)