+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id A0E37429E25\r
+ for <notmuch@notmuchmail.org>; Mon, 19 Dec 2011 07:46:11 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id YiKjXjPyBQRm for <notmuch@notmuchmail.org>;\r
+ Mon, 19 Dec 2011 07:46:11 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ DB894431FB6 for <notmuch@notmuchmail.org>; Mon, 19 Dec 2011 07:46:10 -0800\r
+ (PST)\r
+Received: by wgbds13 with SMTP id ds13so8885979wgb.2\r
+ for <notmuch@notmuchmail.org>; Mon, 19 Dec 2011 07:46:08 -0800 (PST)\r
+Received: by 10.227.208.129 with SMTP id gc1mr15456811wbb.4.1324309568091;\r
+ Mon, 19 Dec 2011 07:46:08 -0800 (PST)\r
+Received: from hotblack-desiato.hh.sledj.net\r
+ (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
+ by mx.google.com with ESMTPS id\r
+ hn15sm26279256wib.22.2011.12.19.07.46.06\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Mon, 19 Dec 2011 07:46:07 -0800 (PST)\r
+Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
+ id 24650A032E; Mon, 19 Dec 2011 15:46:05 +0000 (GMT)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC][PATCH] emacs: Provide scaffolding so that the new `shr' HTML\r
+ renderer can run.\r
+Date: Mon, 19 Dec 2011 15:45:59 +0000\r
+Message-Id: <1324309559-7993-1-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.7.7.3\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 19 Dec 2011 15:46:11 -0000\r
+\r
+Latest gnus provides a new HTML renderer entirely in lisp. It requires\r
+some minor but ugly scaffolding to allow use with notmuch.\r
+---\r
+\r
+This is pretty horrible, but works in the cases that I tested. It\r
+would be useful if a few other people could test. Note that `cid:'\r
+images included with a text/html part are not inserted in the correct\r
+place, but that also appears to be the case for gnus.\r
+\r
+This should be tagged `notmuch::wip' in the new world order!\r
+\r
+ emacs/notmuch-show.el | 14 +++++++++++++-\r
+ 1 files changed, 13 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 63b01e5..f52f233 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -320,6 +320,13 @@ message at DEPTH in the current thread."\r
+ ;; ange-ftp, which is reasonable to use here.\r
+ (mm-write-region (point-min) (point-max) file nil nil nil 'no-conversion t)))))\r
+ \r
++;; Nonsense required to have the new gnus `shr' HTML display code\r
++;; work.\r
++(defvar gnus-summary-buffer)\r
++(defvar gnus-inhibit-images)\r
++(if (not (fboundp 'gnus-blocked-images))\r
++ (defun gnus-blocked-images () nil))\r
++\r
+ (defun notmuch-show-mm-display-part-inline (msg part nth content-type)\r
+ "Use the mm-decode/mm-view functions to display a part in the\r
+ current buffer, if possible."\r
+@@ -331,7 +338,12 @@ current buffer, if possible."\r
+ (let ((content (notmuch-show-get-bodypart-content msg part nth)))\r
+ (insert content)\r
+ (set-buffer display-buffer)\r
+- (mm-display-part handle)\r
++\r
++ ;; Nonsense required to have the new gnus `shr' HTML\r
++ ;; display code work.\r
++ (let ((gnus-inhibit-images nil))\r
++ (makunbound 'gnus-summary-buffer) ; Blech.\r
++ (mm-display-part handle))\r
+ t)\r
+ nil)))))\r
+ \r
+-- \r
+1.7.7.3\r
+\r