Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / e6 / 7154723b995661f24f29c3b4d992b665821e2d
1 Return-Path: <keith@nicira.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 5316D431FBC\r
6         for <notmuch@notmuchmail.org>; Sat,  5 Dec 2009 14:54:57 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id msYBNShv-moj for <notmuch@notmuchmail.org>;\r
11         Sat,  5 Dec 2009 14:54:56 -0800 (PST)\r
12 Received: from mout.perfora.net (mout.perfora.net [74.208.4.194])\r
13         by olra.theworths.org (Postfix) with ESMTP id C2AEE431FAE\r
14         for <notmuch@notmuchmail.org>; Sat,  5 Dec 2009 14:54:56 -0800 (PST)\r
15 Received: from vps.nicira.com (66.7.219.28.static.dimenoc.com [66.7.219.28])\r
16         by mx.perfora.net (node=mxus2) with ESMTP (Nemesis)\r
17         id 0MUXvv-1Nh4yJ0ICp-00RByG for notmuch@notmuchmail.org;\r
18         Sat, 05 Dec 2009 17:54:56 -0500\r
19 Received: from hq.nicira.com ([209.172.104.10]:40203 helo=kea-nicira-lt)\r
20         by vps.nicira.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69)\r
21         (envelope-from <keith@nicira.com>)\r
22         id 1NH3WW-0001wV-7p; Sat, 05 Dec 2009 17:54:53 -0500\r
23 Received: by kea-nicira-lt (sSMTP sendmail emulation);\r
24         Sat, 05 Dec 2009 14:54:42 -0800\r
25 From: Keith Amidon <keith@nicira.com>\r
26 To: notmuch@notmuchmail.org\r
27 Date: Sat,  5 Dec 2009 14:53:59 -0800\r
28 Message-Id: <1260053640-10034-2-git-send-email-keith@nicira.com>\r
29 X-Mailer: git-send-email 1.6.5.4\r
30 In-Reply-To: <1260053640-10034-1-git-send-email-keith@nicira.com>\r
31 References: <1260053640-10034-1-git-send-email-keith@nicira.com>\r
32 X-AntiAbuse: This header was added to track abuse,\r
33         please include it with any abuse report\r
34 X-AntiAbuse: Primary Hostname - vps.nicira.com\r
35 X-AntiAbuse: Original Domain - notmuchmail.org\r
36 X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]\r
37 X-AntiAbuse: Sender Address Domain - nicira.com\r
38 X-Source: \r
39 X-Source-Args: \r
40 X-Source-Dir: \r
41 X-Mailman-Approved-At: Mon, 07 Dec 2009 09:47:22 -0800\r
42 Cc: Keith Amidon <keith@nicira.com>\r
43 Subject: [notmuch] [PATCH 1/2] Expand scope of items considered when saving\r
44         attachments\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.12\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Sat, 05 Dec 2009 22:54:57 -0000\r
58 \r
59 Previously only mime parts that indicated specified a "disposition" of\r
60 "attachment" were saved.  However there are time when it is important\r
61 to be able to save inline content as well.  After this commit any mime\r
62 part that specifies a filename will be considered when saving\r
63 attachments.\r
64 ---\r
65  notmuch.el |    8 ++++++--\r
66  1 files changed, 6 insertions(+), 2 deletions(-)\r
67 \r
68 diff --git a/notmuch.el b/notmuch.el\r
69 index c504f46..8d51709 100644\r
70 --- a/notmuch.el\r
71 +++ b/notmuch.el\r
72 @@ -322,7 +322,9 @@ buffer."\r
73       (lambda (p)\r
74         (let ((disposition (mm-handle-disposition p)))\r
75           (and (listp disposition)\r
76 -              (equal (car disposition) "attachment")\r
77 +              (or (equal (car disposition) "attachment")\r
78 +                  (and (equal (car disposition) "inline")\r
79 +                       (assq 'filename disposition)))\r
80                (incf count))))\r
81       mm-handle)\r
82      count))\r
83 @@ -332,7 +334,9 @@ buffer."\r
84     (lambda (p)\r
85       (let ((disposition (mm-handle-disposition p)))\r
86         (and (listp disposition)\r
87 -            (equal (car disposition) "attachment")\r
88 +            (or (equal (car disposition) "attachment")\r
89 +                (and (equal (car disposition) "inline")\r
90 +                     (assq 'filename disposition)))\r
91              (or (not queryp)\r
92                  (y-or-n-p\r
93                   (concat "Save '" (cdr (assq 'filename disposition)) "' ")))\r
94 -- \r
95 1.6.5.4\r
96 \r