Re: notmuch-search-toggle-order and notmuch-tree
[notmuch-archives.git] / fb / deb37e0a1396594fe8ac46f83d31815a175efa
1 Return-Path: <m.walters@qmul.ac.uk>\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 53656429E5F\r
6         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 16:39:37 -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: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id gmxJweDiFqLB for <notmuch@notmuchmail.org>;\r
17         Tue, 17 Jan 2012 16:39:37 -0800 (PST)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id C0DEC429E27\r
22         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 16:39:36 -0800 (PST)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1RnJYs-00072v-Tx; Wed, 18 Jan 2012 00:39:35 +0000\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
28         helo=localhost)\r
29         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
30         (envelope-from <m.walters@qmul.ac.uk>)\r
31         id 1RnJYs-0007CO-Mx; Wed, 18 Jan 2012 00:39:34 +0000\r
32 From: Mark Walters <markwalters1009@gmail.com>\r
33 To: Austin Clements <amdragon@MIT.EDU>\r
34 Subject: Re: [PATCH v3] Make buttons for attachments allow viewing as well as\r
35         saving\r
36 In-Reply-To: <20120117235318.GZ16740@mit.edu>\r
37 References: <87lip5rj43.fsf@qmul.ac.uk>\r
38         <1326843886-18387-1-git-send-email-markwalters1009@gmail.com>\r
39         <20120117235318.GZ16740@mit.edu>\r
40 User-Agent: Notmuch/0.11~rc2+73~g1ea2b60 (http://notmuchmail.org) Emacs/23.2.1\r
41         (i486-pc-linux-gnu)\r
42 Date: Wed, 18 Jan 2012 00:40:22 +0000\r
43 Message-ID: <87ipk9rgg9.fsf@qmul.ac.uk>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 X-Sender-Host-Address: 94.192.233.223\r
47 X-QM-SPAM-Info: Sender has good ham record.  :)\r
48 X-QM-Body-MD5: 821e29e0240c6907a76ad32d1df5de16 (of first 20000 bytes)\r
49 X-SpamAssassin-Score: -1.8\r
50 X-SpamAssassin-SpamBar: -\r
51 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
52         determine if it is\r
53         spam. We require at least 5.0 points to mark a message as spam.\r
54         This message scored -1.8 points.\r
55         Summary of the scoring: \r
56         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
57         *      medium trust\r
58         *      [138.37.6.40 listed in list.dnswl.org]\r
59         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
60         provider *      (markwalters1009[at]gmail.com)\r
61         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
62         *      domain\r
63         *  0.6 AWL AWL: From: address is in the auto white-list\r
64 X-QM-Scan-Virus: ClamAV says the message is clean\r
65 Cc: notmuch@notmuchmail.org\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.13\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70         <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Wed, 18 Jan 2012 00:39:37 -0000\r
79 \r
80 \r
81 > Oof, sorry.  Two more tweaks that I really should have caught in the\r
82 > previous version.  After that this gets my automatic +1.\r
83 \r
84 Both fixed. I have also fixed the bug I mentioned (missing filename when\r
85 "view" falls back on save); I couldn't make it work with the\r
86 "no-default" option. However overriding mm-save-part with flet seems to\r
87 do the trick.\r
88 \r
89 +(defun notmuch-show-view-part (message-id nth &optional filename content-type )\r
90 +  (notmuch-with-temp-part-buffer message-id nth\r
91 +    ;; set mm-inlined-types to nil to force an external viewer\r
92 +    (let ((handle (mm-make-handle (current-buffer) (list content-type)))\r
93 +         (mm-inlined-types nil))\r
94 +      ;; We override mm-save-part as notmuch-show-save-part is better\r
95 +      ;; since it offers the filename\r
96 +      (flet ((mm-save-part (&rest args) (ignore)))\r
97 +           (or (mm-display-part handle)\r
98 +               (notmuch-show-save-part message-id nth filename content-type))))))\r
99 \r
100 Is that a reasonable solution? \r
101 \r
102 Best wishes\r
103 \r
104 Mark\r