[PATCH] emacs: show: change emacs interactive pipe message.
authorMark Walters <markwalters1009@gmail.com>
Thu, 30 May 2013 20:11:07 +0000 (21:11 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:10 +0000 (09:55 -0800)
a3/ef10317422909c59aae684b6f891bd34dbce1d [new file with mode: 0644]

diff --git a/a3/ef10317422909c59aae684b6f891bd34dbce1d b/a3/ef10317422909c59aae684b6f891bd34dbce1d
new file mode 100644 (file)
index 0000000..2d58112
--- /dev/null
@@ -0,0 +1,99 @@
+Return-Path: <markwalters1009@gmail.com>\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 068A2431FC2\r
+       for <notmuch@notmuchmail.org>; Thu, 30 May 2013 13:11:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       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 KeIYxOUE7bkA for <notmuch@notmuchmail.org>;\r
+       Thu, 30 May 2013 13:11:27 -0700 (PDT)\r
+Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com\r
+       [209.85.212.177]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 4F7FC431FBC\r
+       for <notmuch@notmuchmail.org>; Thu, 30 May 2013 13:11:27 -0700 (PDT)\r
+Received: by mail-wi0-f177.google.com with SMTP id hr14so68129wib.10\r
+       for <notmuch@notmuchmail.org>; Thu, 30 May 2013 13:11:24 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer;\r
+       bh=P2r7s0ujpubjN4C+127pTJzx162HSRlgdPv3KmrdzZs=;\r
+       b=w1Sh9FxrdaJgMD/+tkxqgKf5bw1xBF+GF9dDzdZ567ZlMXB0IkPSfjkfQQfkuq0cg+\r
+       BxEiJSnwr7YMgplDCY9/1/5r5Wv4vXczAOiO6THd69TxMhhIHQorMQM2a+d8C5TH1MdJ\r
+       rrflQ/ut5SC0KXvW+4cP/aNjEw/BkXZ5NFKaVqb3WEcQ9DQiJ+QV3O3E4/BkvNn93xLd\r
+       qMj+mbXbJMJnPeNInthjoyD7Gx+dXlQ3ALqtJJi8ZfGDZds3jyhY4yB44JQzlY0/4tGl\r
+       qmn2zdHbGt1pprYuEhwc3ExQwT+Xj0Q1gx/p1BjWETQFMj6mbt+hX62sUcBfKC/cQ56o\r
+       SZfw==\r
+X-Received: by 10.180.184.101 with SMTP id et5mr299695wic.45.1369944684778;\r
+       Thu, 30 May 2013 13:11:24 -0700 (PDT)\r
+Received: from localhost (188.31.30.81.threembb.co.uk. [188.31.30.81])\r
+       by mx.google.com with ESMTPSA id q20sm561179wiv.7.2013.05.30.13.11.19\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Thu, 30 May 2013 13:11:24 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: show: change emacs interactive pipe message.\r
+Date: Thu, 30 May 2013 21:11:07 +0100\r
+Message-Id: <1369944667-22705-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.10.4\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: Thu, 30 May 2013 20:11:35 -0000\r
+\r
+Previously the query string for piping a message to a command was\r
+"Pipe message to command: " regardless of whether the function was\r
+called with a prefix argument (which pipes all open messages to the\r
+command). This patch modifies the `interactive' command to reflect\r
+this.\r
+---\r
+It has irritated me for a while that I couldn't tell if I had\r
+remembered to press c-u before piping messages to git am etc. This\r
+fixes that. There may be other better ways: suggestions welcome!\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+ emacs/notmuch-show.el |    7 +++++--\r
+ 1 file changed, 5 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 75fa7c8..2fc818f 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1716,8 +1716,11 @@ to stdout or stderr will appear in the *notmuch-pipe* buffer.\r
+ When invoked with a prefix argument, the command will receive all\r
+ open messages in the current thread (formatted as an mbox) rather\r
+ than only the current message."\r
+-  (interactive "P\nsPipe message to command: ")\r
+-  (let (shell-command)\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
+-- \r
+1.7.10.4\r
+\r