[PATCH 1/1] Add a function for applying an arbitrary number of tags to the highlighte...
[notmuch-archives.git] / e9 / 6a41c249bd90b978ad3735c26328840dc00445
1 Return-Path: <tbielawa@redhat.com>\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 5BDD8431FB6\r
6         for <notmuch@notmuchmail.org>; Wed,  7 Mar 2012 14:39:15 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -5\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-5 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_HI=-5] 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 ZCKCfco0OJ3Y for <notmuch@notmuchmail.org>;\r
16         Wed,  7 Mar 2012 14:39:13 -0800 (PST)\r
17 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\r
18         by olra.theworths.org (Postfix) with ESMTP id 91823431FAE\r
19         for <notmuch@notmuchmail.org>; Wed,  7 Mar 2012 14:39:13 -0800 (PST)\r
20 Received: from int-mx09.intmail.prod.int.phx2.redhat.com\r
21         (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])\r
22         by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q27MdCSP014827\r
23         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)\r
24         for <notmuch@notmuchmail.org>; Wed, 7 Mar 2012 17:39:12 -0500\r
25 Received: from localhost.localdomain ([10.3.113.2])\r
26         by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP\r
27         id q27MdBI7003549\r
28         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)\r
29         for <notmuch@notmuchmail.org>; Wed, 7 Mar 2012 17:39:12 -0500\r
30 From: Tim Bielawa <tbielawa@redhat.com>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH 1/1] Add a function for applying an arbitrary number of tags\r
33         to the highlighted message thread while in notmuch-search-mode.\r
34         Intended to restore the original functionality of\r
35         notmuch-search-remove-tag and notmuch-search-add-tag prior to\r
36         2beaefa2.\r
37 Date: Wed,  7 Mar 2012 17:39:10 -0500\r
38 Message-Id: <1331159950-21565-1-git-send-email-tbielawa@redhat.com>\r
39 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Wed, 07 Mar 2012 22:39:15 -0000\r
53 \r
54 ---\r
55  emacs/notmuch.el |    9 +++++++++\r
56  1 files changed, 9 insertions(+), 0 deletions(-)\r
57 \r
58 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
59 index 99e0c93..b731c7c 100644\r
60 --- a/emacs/notmuch.el\r
61 +++ b/emacs/notmuch.el\r
62 @@ -663,6 +663,15 @@ added or removed for all threads in the region from BEG to END."\r
63    (interactive)\r
64    (notmuch-search-tag "-"))\r
65  \r
66 +(defun notmuch-search-tag-and-advance (&rest tags)\r
67 +  "Apply a tag or set of tags to the current thread.\r
68 +\r
69 +Shortcut to simplify applying tags in search mode. Targeted for\r
70 +use in key-bound functions. Advances to the next thread after\r
71 +applying the tags."\r
72 +  (mapc 'notmuch-search-tag-thread tags)\r
73 +  (notmuch-search-next-thread))\r
74 +\r
75  (defun notmuch-search-archive-thread ()\r
76    "Archive the currently selected thread (remove its \"inbox\" tag).\r
77  \r
78 -- \r
79 1.7.4.4\r
80 \r