* mm-inline-text-html-with-images and shr
@ 2016-01-29 3:35 Mike Kupfer
0 siblings, 0 replies; only message in thread
From: Mike Kupfer @ 2016-01-29 3:35 UTC (permalink / raw)
To: ding
Hi, as you might know, MH-E uses the Emacs MIME (mm) libraries to
display emails. MH-E users have noticed that if mm-text-html-renderer
is set to 'shr and an HTML email refers to an external image, Emacs will
try to download the image, even when mm-inline-text-html-with-images is
nil.
With Gnus, shr does not have this problem.
AFAICT, this is because shr doesn't pay attention to
mm-inline-text-html-with-images. Instead, it relies on
gnus-blocked-images to control whether an image gets downloaded.
I want to fix MH-E so that it doesn't download images unless the user
has said to. But I'm not sure what would be a clean way to do that.
The best I've come up with so far is to temporarily rebind
gnus-blocked-images before calling mm-display-part.
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -709,7 +709,9 @@
region buffer-read-only)
(save-excursion
(unwind-protect
- (let ((win (get-buffer-window (current-buffer) t)))
+ (let ((win (get-buffer-window (current-buffer) t))
+ (gnus-blocked-images
+ (if mm-inline-text-html-with-images nil ".")))
(when win
(select-window win))
(goto-char point)
Is there a better way? Could shr be made to honor
mm-inline-text-html-with-images?
thanks,
mike
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-29 3:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-29 3:35 mm-inline-text-html-with-images and shr Mike Kupfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).