[PATCH 5/6] emacs: add support for reversing notmuch-search-archive-thread tag changes
[notmuch-archives.git] / 6e / 96c5100d612b8c759abd41d797c236f29c6dbf
1 Return-Path: <jani@nikula.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 6D620431FC0\r
6         for <notmuch@notmuchmail.org>; Sun,  2 Sep 2012 12:58:26 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
13         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id NNvUhySy3U5J for <notmuch@notmuchmail.org>;\r
17         Sun,  2 Sep 2012 12:58:25 -0700 (PDT)\r
18 Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
19         [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 659F2431FB6\r
22         for <notmuch@notmuchmail.org>; Sun,  2 Sep 2012 12:58:25 -0700 (PDT)\r
23 Received: by mail-lpp01m010-f53.google.com with SMTP id c1so3430631lah.26\r
24         for <notmuch@notmuchmail.org>; Sun, 02 Sep 2012 12:58:25 -0700 (PDT)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=google.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
28         :in-reply-to:references:x-gm-message-state;\r
29         bh=fMeP6o5DuzHohZZWfgud7xAXNPMntgwOaeHEqyJeHMs=;\r
30         b=LJAYdnBk8uZiBViDOVzARVw+l/ikO6p0kFGnCmKpLobXD+CXWTpi8ca/FV0nWtcWph\r
31         eD3XoGyqF2tudeADpgu2ZOJIC3Rlx56WixMkMQJTqjXuxfUI0+Dq6OGY5WpcqFxcIqs2\r
32         J+cOPSJKvlNy276N98CV5kwKi3L9tb2w/jHp8Dybs2dJ836W9DTr/SQRVTZPMyns3qAK\r
33         39U3LZwRZaGVBTUQJJpi/hiXb56v+20TnTkdQCIczTZgbQzOLz+R972C+S/pEgV/2wp+\r
34         y8aFkQXkWpZIIcSbzSk/ljH2xGzXWQnm9amRb4rw2w9OJHw0JPXW6JEtThJ9o5bADGko\r
35         y/wA==\r
36 Received: by 10.112.99.37 with SMTP id en5mr4766578lbb.25.1346615905047;\r
37         Sun, 02 Sep 2012 12:58:25 -0700 (PDT)\r
38 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
39         [80.223.81.27])\r
40         by mx.google.com with ESMTPS id lv13sm11363282lab.8.2012.09.02.12.58.23\r
41         (version=SSLv3 cipher=OTHER); Sun, 02 Sep 2012 12:58:24 -0700 (PDT)\r
42 From: Jani Nikula <jani@nikula.org>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH 5/6] emacs: add support for reversing\r
45         notmuch-search-archive-thread tag changes\r
46 Date: Sun,  2 Sep 2012 22:58:04 +0300\r
47 Message-Id:\r
48  <018b1a8f2d1df62e804ce88b65401304832dfbbf.1346614915.git.jani@nikula.org>\r
49 X-Mailer: git-send-email 1.7.9.5\r
50 In-Reply-To: <cover.1346614915.git.jani@nikula.org>\r
51 References: <cover.1346614915.git.jani@nikula.org>\r
52 In-Reply-To: <cover.1346614915.git.jani@nikula.org>\r
53 References: <cover.1346614915.git.jani@nikula.org>\r
54 X-Gm-Message-State:\r
55  ALoCoQn1LtjEiE4c9HOCdvm5t6B2cOJPg45+x+pIVMv4JIppcoFZhVxdGKNZa8HM8u6nP9T2ah9G\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Sun, 02 Sep 2012 19:58:26 -0000\r
69 \r
70 Since archiving a thread can now be a user customized set of tag\r
71 changes, make reversing this easier. Allow a prefix argument to\r
72 notmuch-search-archive-thread to reverse the archiving, similar to the\r
73 unarchiving in notmuch-show-archive-message.\r
74 ---\r
75  emacs/notmuch.el |    6 +++---\r
76  1 file changed, 3 insertions(+), 3 deletions(-)\r
77 \r
78 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
79 index 64caa3e..a8a85ce 100644\r
80 --- a/emacs/notmuch.el\r
81 +++ b/emacs/notmuch.el\r
82 @@ -593,7 +593,7 @@ See `notmuch-tag' for information on the format of TAG-CHANGES."\r
83    (interactive)\r
84    (notmuch-search-tag "-"))\r
85  \r
86 -(defun notmuch-search-archive-thread ()\r
87 +(defun notmuch-search-archive-thread (&optional unarchive)\r
88    "Archive the currently selected thread.\r
89  \r
90  Archive each message in the currently selected thread by applying\r
91 @@ -603,10 +603,10 @@ messages will be \"unarchived\" (i.e. the tag changes in\r
92  `notmuch-archive-tags' will be reversed).\r
93  \r
94  This function advances the next thread when finished."\r
95 -  (interactive)\r
96 +  (interactive "P")\r
97    (when notmuch-archive-tags\r
98      (notmuch-search-tag\r
99 -     (notmuch-tag-change-list notmuch-archive-tags)))\r
100 +     (notmuch-tag-change-list notmuch-archive-tags unarchive)))\r
101    (notmuch-search-next-thread))\r
102  \r
103  (defun notmuch-search-update-result (result &optional pos)\r
104 -- \r
105 1.7.9.5\r
106 \r