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