Merge pull request #2329 from seanfarley/smf/save-excursion-html

mu4e-view: use `save-excursion' around toggling html
This commit is contained in:
Dirk-Jan C. Binnema
2022-09-08 07:04:04 +03:00
committed by GitHub

View File

@ -1257,12 +1257,13 @@ the third MIME-part."
(interactive) (interactive)
;; This function assumes `gnus-article-mime-handle-alist' is sorted by ;; This function assumes `gnus-article-mime-handle-alist' is sorted by
;; pertinence, i.e. the first HTML part found in it is the most important one. ;; pertinence, i.e. the first HTML part found in it is the most important one.
(if-let ((html-part (save-excursion
(seq-find (lambda (handle) (if-let ((html-part
(equal (mm-handle-media-type (cdr handle)) "text/html")) (seq-find (lambda (handle)
gnus-article-mime-handle-alist))) (equal (mm-handle-media-type (cdr handle)) "text/html"))
(gnus-article-inline-part (car html-part)) gnus-article-mime-handle-alist)))
(mu4e-warn "No html part in this message"))) (gnus-article-inline-part (car html-part))
(mu4e-warn "No html part in this message"))))
(defun mu4e-process-file-through-pipe (path pipecmd) (defun mu4e-process-file-through-pipe (path pipecmd)
"Process file at PATH through a pipe with PIPECMD." "Process file at PATH through a pipe with PIPECMD."