Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5316D431FBC for ; Sat, 5 Dec 2009 14:54:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id msYBNShv-moj for ; Sat, 5 Dec 2009 14:54:56 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id C2AEE431FAE for ; Sat, 5 Dec 2009 14:54:56 -0800 (PST) Received: from vps.nicira.com (66.7.219.28.static.dimenoc.com [66.7.219.28]) by mx.perfora.net (node=mxus2) with ESMTP (Nemesis) id 0MUXvv-1Nh4yJ0ICp-00RByG for notmuch@notmuchmail.org; Sat, 05 Dec 2009 17:54:56 -0500 Received: from hq.nicira.com ([209.172.104.10]:40203 helo=kea-nicira-lt) by vps.nicira.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NH3WW-0001wV-7p; Sat, 05 Dec 2009 17:54:53 -0500 Received: by kea-nicira-lt (sSMTP sendmail emulation); Sat, 05 Dec 2009 14:54:42 -0800 From: Keith Amidon To: notmuch@notmuchmail.org Date: Sat, 5 Dec 2009 14:53:59 -0800 Message-Id: <1260053640-10034-2-git-send-email-keith@nicira.com> X-Mailer: git-send-email 1.6.5.4 In-Reply-To: <1260053640-10034-1-git-send-email-keith@nicira.com> References: <1260053640-10034-1-git-send-email-keith@nicira.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.nicira.com X-AntiAbuse: Original Domain - notmuchmail.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nicira.com X-Source: X-Source-Args: X-Source-Dir: X-Mailman-Approved-At: Mon, 07 Dec 2009 09:47:22 -0800 Cc: Keith Amidon Subject: [notmuch] [PATCH 1/2] Expand scope of items considered when saving attachments X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 22:54:57 -0000 Previously only mime parts that indicated specified a "disposition" of "attachment" were saved. However there are time when it is important to be able to save inline content as well. After this commit any mime part that specifies a filename will be considered when saving attachments. --- notmuch.el | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/notmuch.el b/notmuch.el index c504f46..8d51709 100644 --- a/notmuch.el +++ b/notmuch.el @@ -322,7 +322,9 @@ buffer." (lambda (p) (let ((disposition (mm-handle-disposition p))) (and (listp disposition) - (equal (car disposition) "attachment") + (or (equal (car disposition) "attachment") + (and (equal (car disposition) "inline") + (assq 'filename disposition))) (incf count)))) mm-handle) count)) @@ -332,7 +334,9 @@ buffer." (lambda (p) (let ((disposition (mm-handle-disposition p))) (and (listp disposition) - (equal (car disposition) "attachment") + (or (equal (car disposition) "attachment") + (and (equal (car disposition) "inline") + (assq 'filename disposition))) (or (not queryp) (y-or-n-p (concat "Save '" (cdr (assq 'filename disposition)) "' "))) -- 1.6.5.4