Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
[notmuch-archives.git] / 52 / 2fde2962b3972eabfbed7241ee14cbb2ba21bc
1 Return-Path: <pieter@praet.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id AD565429E2B\r
6         for <notmuch@notmuchmail.org>; Sun,  3 Jul 2011 23:53:11 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id bqE13AQQ0Q3E for <notmuch@notmuchmail.org>;\r
16         Sun,  3 Jul 2011 23:53:11 -0700 (PDT)\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
18         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 1F359431FD0\r
21         for <notmuch@notmuchmail.org>; Sun,  3 Jul 2011 23:53:10 -0700 (PDT)\r
22 Received: by mail-wy0-f181.google.com with SMTP id 22so3733696wyh.26\r
23         for <notmuch@notmuchmail.org>; Sun, 03 Jul 2011 23:53:10 -0700 (PDT)\r
24 Received: by 10.216.68.2 with SMTP id k2mr4294185wed.0.1309762390792;\r
25         Sun, 03 Jul 2011 23:53:10 -0700 (PDT)\r
26 Received: from localhost ([109.131.160.67])\r
27         by mx.google.com with ESMTPS id ei4sm4224028wbb.60.2011.07.03.23.53.09\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Sun, 03 Jul 2011 23:53:10 -0700 (PDT)\r
30 From: Pieter Praet <pieter@praet.org>\r
31 To: Austin Clements <amdragon@mit.edu>\r
32 Subject: [PATCH 5/5] emacs: make `notmuch-search-operate-all' use\r
33         matched-msgids instead of the original query string\r
34 Date: Mon,  4 Jul 2011 08:51:58 +0200\r
35 Message-Id: <1309762318-4530-6-git-send-email-pieter@praet.org>\r
36 X-Mailer: git-send-email 1.7.5.4\r
37 In-Reply-To: <1309762318-4530-1-git-send-email-pieter@praet.org>\r
38 References: <20110703171743.GL15901@mit.edu>\r
39         <1309762318-4530-1-git-send-email-pieter@praet.org>\r
40 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Mon, 04 Jul 2011 06:53:11 -0000\r
54 \r
55 Signed-off-by: Pieter Praet <pieter@praet.org>\r
56 ---\r
57  emacs/notmuch.el |    7 +++++--\r
58  1 files changed, 5 insertions(+), 2 deletions(-)\r
59 \r
60 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
61 index 46e276a..0d040a2 100644\r
62 --- a/emacs/notmuch.el\r
63 +++ b/emacs/notmuch.el\r
64 @@ -869,7 +869,10 @@ Each character of the tag name may consist of alphanumeric\r
65  characters as well as `_.+-'.\r
66  "\r
67    (interactive "sOperation (+add -drop): notmuch tag ")\r
68 -  (let ((action-split (split-string action " +")))\r
69 +  (let ((action-split (split-string action " +"))\r
70 +        (msgids (mapconcat 'identity\r
71 +                           (notmuch-search-find-matched-msgids-region (point-min) (- (point-max) 2))\r
72 +                           " or ")))\r
73      ;; Perform some validation\r
74      (let ((words action-split))\r
75        (when (null words) (error "No operation given"))\r
76 @@ -877,7 +880,7 @@ characters as well as `_.+-'.\r
77         (unless (string-match-p "^[-+][-+_.[:word:]]+$" (car words))\r
78           (error "Action must be of the form `+thistag -that_tag'"))\r
79         (setq words (cdr words))))\r
80 -    (apply 'notmuch-tag notmuch-search-query-string action-split)))\r
81 +    (apply 'notmuch-tag msgids action-split)))\r
82  \r
83  (defun notmuch-search-buffer-title (query)\r
84    "Returns the title for a buffer with notmuch search results."\r
85 -- \r
86 1.7.5.4\r
87 \r