Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / ea / 6162ad3038cbdd1cbdace97af53aeb1d1f98ed
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 C68D7431FAF\r
6         for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 02:45:18 -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 Nl9vSNoeW8rD for <notmuch@notmuchmail.org>;\r
17         Wed, 18 Jan 2012 02:45:18 -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 3AA8F431FAE\r
22         for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 02:45:18 -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 1RnT0y-0006Cj-Qw; Wed, 18 Jan 2012 10:45:13 +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 1RnT0y-0004yY-Dj; Wed, 18 Jan 2012 10:45:12 +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: <20120118012539.GA16740@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> <87ipk9rgg9.fsf@qmul.ac.uk>\r
40         <20120118012539.GA16740@mit.edu>\r
41 User-Agent: Notmuch/0.11~rc2+73~g1ea2b60 (http://notmuchmail.org) Emacs/23.2.1\r
42         (i486-pc-linux-gnu)\r
43 Date: Wed, 18 Jan 2012 10:46:00 +0000\r
44 Message-ID: <87fwfdqoev.fsf@qmul.ac.uk>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 X-Sender-Host-Address: 94.192.233.223\r
48 X-QM-SPAM-Info: Sender has good ham record.  :)\r
49 X-QM-Body-MD5: 8a7afb20fe3d809200e60c21cbfad16b (of first 20000 bytes)\r
50 X-SpamAssassin-Score: -1.8\r
51 X-SpamAssassin-SpamBar: -\r
52 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
53         determine if it is\r
54         spam. We require at least 5.0 points to mark a message as spam.\r
55         This message scored -1.8 points.\r
56         Summary of the scoring: \r
57         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
58         *      medium trust\r
59         *      [138.37.6.40 listed in list.dnswl.org]\r
60         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
61         provider *      (markwalters1009[at]gmail.com)\r
62         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
63         *      domain\r
64         *  0.5 AWL AWL: From: address is in the auto white-list\r
65 X-QM-Scan-Virus: ClamAV says the message is clean\r
66 Cc: notmuch@notmuchmail.org\r
67 X-BeenThere: notmuch@notmuchmail.org\r
68 X-Mailman-Version: 2.1.13\r
69 Precedence: list\r
70 List-Id: "Use and development of the notmuch mail system."\r
71         <notmuch.notmuchmail.org>\r
72 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
74 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
75 List-Post: <mailto:notmuch@notmuchmail.org>\r
76 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
77 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
78         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
79 X-List-Received-Date: Wed, 18 Jan 2012 10:45:18 -0000\r
80 \r
81 \r
82 > > +(defun notmuch-show-view-part (message-id nth &optional filename content-type )\r
83 > > +  (notmuch-with-temp-part-buffer message-id nth\r
84 > > +    ;; set mm-inlined-types to nil to force an external viewer\r
85 > > +    (let ((handle (mm-make-handle (current-buffer) (list content-type)))\r
86 > > +         (mm-inlined-types nil))\r
87 > > +      ;; We override mm-save-part as notmuch-show-save-part is better\r
88 > > +      ;; since it offers the filename\r
89 > > +      (flet ((mm-save-part (&rest args) (ignore)))\r
90 > > +           (or (mm-display-part handle)\r
91 > > +               (notmuch-show-save-part message-id nth filename content-type))))))\r
92 > > \r
93 > > Is that a reasonable solution? \r
94\r
95 > It's *probably* safe to depend on the result of mm-display-part, but\r
96 > you can avoid the question altogether by simply calling\r
97 > notmuch-show-save-part from your flet mm-save-part.  E.g.,\r
98\r
99 > (flet ((mm-save-part (&rest args) (notmuch-show-save-part \r
100 >                                    message-id nth filename content-type)))\r
101 >   (mm-display-part handle))\r
102 \r
103 Unfortunately that does not work since mm-display-part has a local\r
104 variable "filename".  I could copy the variables to some notmuch\r
105 prefixed variables but maybe there is some obvious "quoting" to avoid\r
106 the problem? (I can't easily check now as the gnu site is closed for the\r
107 day.)\r
108 \r
109 Best wishes\r
110 \r
111 Mark\r