Re: [PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / c4 / d84c6d5accf834c2d6fb3e53f8711f97ab8231
1 Return-Path: <markwalters1009@gmail.com>\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 5937D431FB6\r
6         for <notmuch@notmuchmail.org>; Sun, 13 Jan 2013 04:43:58 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id fCG8sEgZ1CPe for <notmuch@notmuchmail.org>;\r
18         Sun, 13 Jan 2013 04:43:57 -0800 (PST)\r
19 Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com\r
20         [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 589E6431FAF\r
23         for <notmuch@notmuchmail.org>; Sun, 13 Jan 2013 04:43:57 -0800 (PST)\r
24 Received: by mail-wi0-f172.google.com with SMTP id o1so715762wic.11\r
25         for <notmuch@notmuchmail.org>; Sun, 13 Jan 2013 04:43:56 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
28         :references; bh=HizGeywuovt5Qcriu6NojLy475rIONGfGO1YbzD8gtE=;\r
29         b=EtALzM9x4y2oPdm3zOkoCfqFJTrx3wxXAlnQvGOn8QpcIy+qxY4/DBBRa8AxfePRX7\r
30         rpQvSopaETZPZ3ROuCwK14EKe2IQOZiQSr78dq9n+VaJF+F8e1lxARNiWV9QMmVPBsWh\r
31         o9AXxEIPebThMdIYK1WiKCTDDaK0IntyZI3Hf14DdjB6O94496DVgLHHEdFckHRPBArb\r
32         wfJ49yHzAQI9xtngz3mxj3npMe4CgHbwKmJvl0vtH1d0U4lzHIbdyt4+kf45NwluMfCA\r
33         f44XbJX807tvI1OJJ49b2e5UAcSB2k/iQuujjLqefyqTruHBWMsZe8RFrhkJVvyFyR+b\r
34         dlxw==\r
35 X-Received: by 10.180.95.135 with SMTP id dk7mr7464929wib.29.1358081034918;\r
36         Sun, 13 Jan 2013 04:43:54 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id g2sm8753025wiy.0.2013.01.13.04.43.53\r
39         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
40         Sun, 13 Jan 2013 04:43:54 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v3] emacs: show: possible w3m/invisibility workaround\r
44 Date: Sun, 13 Jan 2013 12:43:52 +0000\r
45 Message-Id: <1358081032-3066-1-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 In-Reply-To: <1357862220-1219-1-git-send-email-markwalters1009@gmail.com>\r
48 References: <1357862220-1219-1-git-send-email-markwalters1009@gmail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Sun, 13 Jan 2013 12:43:58 -0000\r
62 \r
63 There is a bug in the current notmuch code with w3m and invisible\r
64 parts. w3m sets a keymap, and if we have a hidden [text/html] point\r
65 at the start of the following line still gets this w3m keymap which\r
66 causes some strange effects. For example, RET gives an error "No URL\r
67 at Point" rather than hiding the message, <down> goes to the next link\r
68 rather than just down a line.\r
69 \r
70 These keybinding are also inconvenient when the text/html part is\r
71 displayed so we ask w3m not to install a keymap.\r
72 \r
73 This is only likely to be a problem for emacs 23 as shr is preferred\r
74 as html renderer on emacs 24 (although the user can set the renderer\r
75 to w3m even on emacs 24).\r
76 \r
77 This solution was suggested by Tomi Ollila <tomi.ollila@iki.fi>\r
78 ---\r
79 \r
80 On irc Tomi found the correct way of stopping w3m setting a keymap:\r
81 there is a variable mm-inline-text-html-with-w3m-keymap which can be\r
82 set to nil to tell w3m not to set a keymap.\r
83 \r
84 I think this is the best solution to this bug for 0.15. My view is\r
85 that this is correct anyway: w3m does render quickly and nicely (and\r
86 will probably be my default renderer from now on) and with this patch\r
87 the keybinding problems are the normal notmuch bindings.\r
88 \r
89 Jani pointed out that in the new invisibility setup all text/html\r
90 parts are rendered (invisibly) when notmuch-show runs. We may want to\r
91 allow the user to supress this: in fact they can by setting\r
92 mm-text-html-renderer to nil but we may want to allow the suppression\r
93 without affecting gnus etc, or we may want to link this option into\r
94 the notmuch-show customization, or maybe just mention in NEWS.\r
95 \r
96 Any such fix is a obviously a separate patch.\r
97 \r
98 Best wishes\r
99 \r
100 Mark\r
101 \r
102 \r
103 \r
104  emacs/notmuch-show.el |   10 ++++++++++\r
105  1 files changed, 10 insertions(+), 0 deletions(-)\r
106 \r
107 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
108 index 5751d98..1864dd1 100644\r
109 --- a/emacs/notmuch-show.el\r
110 +++ b/emacs/notmuch-show.el\r
111 @@ -818,6 +818,16 @@ message at DEPTH in the current thread."\r
112  (defun notmuch-show-insert-part-inline-patch-fake-part (msg part content-type nth depth declared-type)\r
113    (notmuch-show-insert-part-*/* msg part "text/x-diff" nth depth "inline patch"))\r
114  \r
115 +(defun notmuch-show-insert-part-text/html (msg part content-type nth depth declared-type)\r
116 +  ;; text/html handler to work around bugs in renderers and our\r
117 +  ;; invisibile parts code. In particular w3m sets up a keymap which\r
118 +  ;; "leaks" outside the invisible region and causes strange effects\r
119 +  ;; in notmuch. We set mm-inline-text-html-with-w3m-keymap to nil to\r
120 +  ;; tell w3m not to set a keymap (so the normal notmuch-show-mode-map\r
121 +  ;; remains).\r
122 +  (let ((mm-inline-text-html-with-w3m-keymap nil))\r
123 +    (notmuch-show-insert-part-*/* msg part content-type nth depth declared-type)))\r
124 +\r
125  (defun notmuch-show-insert-part-*/* (msg part content-type nth depth declared-type)\r
126    ;; This handler _must_ succeed - it is the handler of last resort.\r
127    (notmuch-show-insert-part-header nth content-type declared-type (plist-get part :filename))\r
128 -- \r
129 1.7.9.1\r
130 \r