mu4e-view: better error message when we cannot switch text/html

"This is a pseudo article" isn't very helpful.
This commit is contained in:
Dirk-Jan C. Binnema 2023-02-17 19:03:16 +02:00
parent 8b16e5a449
commit 360cf62ba6
1 changed files with 5 additions and 1 deletions

View File

@ -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."