From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86680 Path: news.gmane.org!not-for-mail From: Mike Kupfer Newsgroups: gmane.emacs.gnus.general Subject: mm-inline-text-html-with-images and shr Date: Thu, 28 Jan 2016 19:35:33 -0800 Message-ID: <16731.1454038533@allegro.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: ger.gmane.org 1454038638 28660 80.91.229.3 (29 Jan 2016 03:37:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2016 03:37:18 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M34906@lists.math.uh.edu Fri Jan 29 04:37:02 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aOzrp-0004dO-AF for ding-account@gmane.org; Fri, 29 Jan 2016 04:37:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aOzqb-00053V-Pa; Thu, 28 Jan 2016 21:35:45 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aOzqX-00052w-SV for ding@lists.math.uh.edu; Thu, 28 Jan 2016 21:35:41 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aOzqW-0006MU-4b for ding@lists.math.uh.edu; Thu, 28 Jan 2016 21:35:41 -0600 Original-Received: from shell1.rawbw.com ([198.144.192.42] ident=root) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1aOzqT-0004kX-PD for ding@gnus.org; Fri, 29 Jan 2016 04:35:38 +0100 Original-Received: from allegro.localdomain (m208-249.dsl.rawbw.com [198.144.208.249]) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTP id u0T3ZXwR064719 for ; Thu, 28 Jan 2016 19:35:34 -0800 (PST) (envelope-from m.kupfer@acm.org) X-Authentication-Warning: shell1.rawbw.com: Host m208-249.dsl.rawbw.com [198.144.208.249] claimed to be allegro.localdomain X-Mailer: MH-E 8.6+mdk02; nmh 1.6; GNU Emacs 24.5.2 Content-ID: <16730.1454038533.1@allegro.localdomain> X-Spam-Score: 0.0 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86680 Archived-At: 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