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