diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2024-03-03 11:47:16 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2024-03-03 11:47:16 +0100 |
| commit | e8535fa55fbd75a796a9caec4ce14368ac174c3d (patch) | |
| tree | 0936957f043af83333d2106d24fbc9aece90fa61 /.gnus | |
| parent | 5b4b6d2319fa8594d4c8dd3078a72b45ec0505b8 (diff) | |
| download | dotfiles-e8535fa55fbd75a796a9caec4ce14368ac174c3d.tar.xz | |
Fix HTML-detection "logic"
The previous code failed to detect some HTML emails, perhaps because
the text/html part was nested inside a multipart/alternative?
Lucked onto debbugs-gnu.el by asking xref for occurrences of
gnus-article-mime-handles in the Emacs tree; not sure if M-? showing
results from ~/.emacs.d/elpa was intended, but it sure helped here.
Diffstat (limited to '.gnus')
| -rw-r--r-- | .gnus | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -151,11 +151,16 @@ (setf (alist-get tag shr-external-rendering-functions) shr-function))) (defun my/gnus-article-has-html () + ;; Hard to tell the difference between + ;; * the variable `gnus-article-mime-handles', + ;; * the function `gnus-article-mime-handles', + ;; * the variable `gnus-article-mime-handle-alist'. + ;; + ;; Stealing debbugs.el's patch-finding logic. (seq-some (lambda (handle) - (and (listp handle) - (string= (mm-handle-media-type handle) "text/html"))) - gnus-article-mime-handles)) + (string= (mm-handle-media-type (cdr handle)) "text/html")) + (gnus-article-mime-handles))) (defun my/gnus-article-should-wrap () (save-excursion |
