--- /dev/null
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4B634431FB6\r
+ for <notmuch@notmuchmail.org>; Mon, 7 May 2012 00:02:16 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id YnXVyNZhixXR for <notmuch@notmuchmail.org>;\r
+ Mon, 7 May 2012 00:02:15 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+ [131.215.239.19])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4B354431FAE\r
+ for <notmuch@notmuchmail.org>; Mon, 7 May 2012 00:02:15 -0700 (PDT)\r
+Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+ by earth-doxen-postvirus (Postfix) with ESMTP id CBA6F66E0103\r
+ for <notmuch@notmuchmail.org>; Mon, 7 May 2012 00:02:12 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
+Received: from finestructure.net (66-189-196-221.dhcp.yakm.wa.charter.com\r
+ [66.189.196.221]) (Authenticated sender: jrollins)\r
+ by earth-doxen-submit (Postfix) with ESMTP id E067566E00D8\r
+ for <notmuch@notmuchmail.org>; Mon, 7 May 2012 00:02:10 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+ id ED5EE54F; Mon, 7 May 2012 00:02:09 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH] emacs: add pipe attachment command\r
+Date: Mon, 7 May 2012 00:02:09 -0700\r
+Message-Id: <1336374129-10225-1-git-send-email-jrollins@finestructure.net>\r
+X-Mailer: git-send-email 1.7.10\r
+In-Reply-To: <1336221076-3671-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1336221076-3671-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 07 May 2012 07:02:16 -0000\r
+\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+\r
+Allow the user to pipe the attachment somewhere. Bound to '|' on the\r
+attachment button.\r
+\r
+Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>\r
+---\r
+Nice missing feature. Tested and reviewed. It just needed to be\r
+rebased against the current master.\r
+\r
+ emacs/notmuch-show.el | 10 ++++++++++\r
+ 1 file changed, 10 insertions(+)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index d318430..26bff8f 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -453,6 +453,7 @@ message at DEPTH in the current thread."\r
+ (define-key map "s" 'notmuch-show-part-button-save)\r
+ (define-key map "v" 'notmuch-show-part-button-view)\r
+ (define-key map "o" 'notmuch-show-part-button-interactively-view)\r
++ (define-key map "|" 'notmuch-show-part-button-pipe)\r
+ map)\r
+ "Submap for button commands")\r
+ (fset 'notmuch-show-part-button-map notmuch-show-part-button-map)\r
+@@ -524,6 +525,11 @@ message at DEPTH in the current thread."\r
+ (let ((handle (mm-make-handle (current-buffer) (list content-type))))\r
+ (mm-interactively-view-part handle))))\r
+ \r
++(defun notmuch-show-pipe-part (message-id nth &optional filename content-type)\r
++ (notmuch-with-temp-part-buffer message-id nth\r
++ (let ((handle (mm-make-handle (current-buffer) (list content-type))))\r
++ (mm-pipe-part handle))))\r
++\r
+ (defun notmuch-show-multipart/*-to-list (part)\r
+ (mapcar (lambda (inner-part) (plist-get inner-part :content-type))\r
+ (plist-get part :content)))\r
+@@ -1874,6 +1880,10 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')."\r
+ (interactive)\r
+ (notmuch-show-part-button-internal button #'notmuch-show-interactively-view-part))\r
+ \r
++(defun notmuch-show-part-button-pipe (&optional button)\r
++ (interactive)\r
++ (notmuch-show-part-button-internal button #'notmuch-show-pipe-part))\r
++\r
+ (defun notmuch-show-part-button-internal (button handler)\r
+ (let ((button (or button (button-at (point)))))\r
+ (if button\r
+-- \r
+1.7.10\r
+\r