--- /dev/null
+Return-Path: <dme@dme.org>\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 0E62E431FC3\r
+ for <notmuch@notmuchmail.org>; Fri, 9 May 2014 01:22:33 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 ydzyAsbgTA0J for <notmuch@notmuchmail.org>;\r
+ Fri, 9 May 2014 01:22:28 -0700 (PDT)\r
+Received: from mail-we0-f172.google.com (mail-we0-f172.google.com\r
+ [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 1C9D0431FBF\r
+ for <notmuch@notmuchmail.org>; Fri, 9 May 2014 01:22:27 -0700 (PDT)\r
+Received: by mail-we0-f172.google.com with SMTP id k48so3659841wev.31\r
+ for <notmuch@notmuchmail.org>; Fri, 09 May 2014 01:22:27 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\r
+ :references;\r
+ bh=pOt6MlVxSy5HEZc0EkJj/0lL7DaZvjSTy6J7j7613ac=;\r
+ b=IEPBCT+LM47Nf67ewjrpYJvOAwNMgTQouVSsO2vi0k8U1X7YHiPMECjf1BYMY2x2Ci\r
+ +VaUyq4J5yNsuSylcH/HsZ2P1zJBZryqQfHtvsYPw2AIq165ciutPv0RpBBa0FHsfnUa\r
+ zZB8sG005KIK2pBmgKAjCTZ+aqyjDMOz4uv53NV6QH7xF4AgXOlubY6Xhp7PgciewUQY\r
+ h/QxnEgyH63wLwVldharV09zn4jCogw35ajtAHCkn9UoEQ0fibYE6sPxsFKTuWgInlyB\r
+ 7GkEoabIVrmE9c8XyD5WDd/sDg9tx5ipQKPpcJQZEFFJZ5FtbLwfH1f1zsXYlz/vRv7O\r
+ CTIQ==\r
+X-Gm-Message-State:\r
+ ALoCoQmoPpy9jLq5ml5GpJJy1iECGxiU/iMaSdUWMlXGgu5YJqCGMbXRMIdTLDMWXpC26rxzi0yy\r
+X-Received: by 10.194.92.7 with SMTP id ci7mr7330736wjb.7.1399623745891;\r
+ Fri, 09 May 2014 01:22:25 -0700 (PDT)\r
+Received: from hotblack-desiato.hh.sledj.net\r
+ ([2a01:348:1a2:1:a288:b4ff:fe8a:77d8])\r
+ by mx.google.com with ESMTPSA id ct2sm4527426wjb.33.2014.05.09.01.22.24\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Fri, 09 May 2014 01:22:24 -0700 (PDT)\r
+Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
+ id 14B1910920E; Fri, 9 May 2014 09:22:23 +0100 (BST)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v1 2/3] emacs: Minor re-work of `notmuch-show-pipe-message'\r
+Date: Fri, 9 May 2014 09:22:22 +0100\r
+Message-Id: <1399623743-30478-3-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 2.0.0.rc0\r
+In-Reply-To: <1399623743-30478-1-git-send-email-dme@dme.org>\r
+References: <1399623743-30478-1-git-send-email-dme@dme.org>\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: Fri, 09 May 2014 08:22:33 -0000\r
+\r
+Stylistic only - no functional change.\r
+---\r
+ emacs/notmuch-show.el | 59 +++++++++++++++++++++++++--------------------------\r
+ 1 file changed, 29 insertions(+), 30 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 2ed221a..62c0be6 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1784,36 +1784,35 @@ If ENTIRE-THREAD is non-nil (or when invoked with a prefix\r
+ argument), COMMAND will receive all open messages in the current\r
+ thread (formatted as an mbox) rather than only the current\r
+ message."\r
+- (interactive (let ((query-string (if current-prefix-arg\r
+- "Pipe all open messages to command: "\r
+- "Pipe message to command: ")))\r
+- (list current-prefix-arg (read-string query-string))))\r
+- (let (shell-command)\r
+- (if entire-thread\r
+- (setq shell-command\r
+- (concat notmuch-command " show --format=mbox --exclude=false "\r
+- (shell-quote-argument\r
+- (mapconcat 'identity (notmuch-show-get-message-ids-for-open-messages) " OR "))\r
+- " | " command))\r
+- (setq shell-command\r
+- (concat notmuch-command " show --format=raw "\r
+- (shell-quote-argument (notmuch-show-get-message-id)) " | " command)))\r
+- (let ((cwd default-directory)\r
+- (buf (get-buffer-create (concat "*notmuch-pipe*"))))\r
+- (with-current-buffer buf\r
+- (setq buffer-read-only nil)\r
+- (erase-buffer)\r
+- ;; Use the originating buffer's working directory instead of\r
+- ;; that of the pipe buffer.\r
+- (cd cwd)\r
+- (let ((exit-code (call-process-shell-command shell-command nil buf)))\r
+- (goto-char (point-max))\r
+- (set-buffer-modified-p nil)\r
+- (setq buffer-read-only t)\r
+- (unless (zerop exit-code)\r
+- (switch-to-buffer-other-window buf)\r
+- (message (format "Command '%s' exited abnormally with code %d"\r
+- shell-command exit-code))))))))\r
++ (interactive (let ((prompt (if current-prefix-arg\r
++ "Pipe all open messages to command: "\r
++ "Pipe message to command: ")))\r
++ (list current-prefix-arg (read-string prompt))))\r
++\r
++ (let ((shell-command\r
++ (concat notmuch-command " show"\r
++ (if entire-thread\r
++ (concat " --format=mbox --exclude=false "\r
++ (mapconcat #'shell-quote-argument (notmuch-show-get-message-ids-for-open-messages) " OR "))\r
++ (concat " --format=raw "\r
++ (shell-quote-argument (notmuch-show-get-message-id))))\r
++ " | " command))\r
++ (cwd default-directory)\r
++ (buf (get-buffer-create (concat "*notmuch-pipe*"))))\r
++ (with-current-buffer buf\r
++ (setq buffer-read-only nil)\r
++ (erase-buffer)\r
++ ;; Use the originating buffer's working directory instead of\r
++ ;; that of the pipe buffer.\r
++ (cd cwd)\r
++ (let ((exit-code (call-process-shell-command shell-command nil buf)))\r
++ (goto-char (point-max))\r
++ (set-buffer-modified-p nil)\r
++ (setq buffer-read-only t)\r
++ (unless (zerop exit-code)\r
++ (switch-to-buffer-other-window buf)\r
++ (message (format "Command '%s' exited abnormally with code %d"\r
++ shell-command exit-code)))))))\r
+ \r
+ (defun notmuch-show-tag-message (&rest tag-changes)\r
+ "Change tags for the current message.\r
+-- \r
+2.0.0.rc0\r
+\r