From 360cf62ba6acfc6a585c6c53ecea46c9d9c3774f Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 17 Feb 2023 19:03:16 +0200 Subject: [PATCH] mu4e-view: better error message when we cannot switch text/html "This is a pseudo article" isn't very helpful. --- mu4e/mu4e-view.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 38ea62a3..95895037 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -1291,9 +1291,13 @@ the third MIME-part." (if-let ((html-part (seq-find (lambda (handle) (equal (mm-handle-media-type (cdr handle)) "text/html")) + gnus-article-mime-handle-alist)) + (text-part + (seq-find (lambda (handle) + (equal (mm-handle-media-type (cdr handle)) "text/plain")) gnus-article-mime-handle-alist))) (gnus-article-inline-part (car html-part)) - (mu4e-warn "No html part in this message")))) + (mu4e-warn "Cannot switch; no html and/or text part in this message")))) (defun mu4e-process-file-through-pipe (path pipecmd) "Process file at PATH through a pipe with PIPECMD."