Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / 82 / c7272a7669415f4a7bd1fd553fb3c689b5ddb2
1 Return-Path: <jrollins@finestructure.net>\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 75B9F421192\r
6         for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:35:14 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 AWVX+ZhnbcfT for <notmuch@notmuchmail.org>;\r
16         Mon, 23 Jan 2012 00:35:13 -0800 (PST)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id A3FA4429E54\r
20         for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:35:13 -0800 (PST)\r
21 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by earth-doxen-postvirus (Postfix) with ESMTP id 0B3C366E00ED\r
23         for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:35:11 -0800 (PST)\r
24 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
25 Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com\r
26         [76.174.137.84]) (Authenticated sender: jrollins)\r
27         by earth-doxen-submit (Postfix) with ESMTP id 2AA4966E0164\r
28         for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:34:25 -0800 (PST)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 4FD43B34; Mon, 23 Jan 2012 00:34:25 -0800 (PST)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH 2/6] emacs: break out thread navigation from\r
34         notmuch-show-archive-thread\r
35 Date: Mon, 23 Jan 2012 00:34:21 -0800\r
36 Message-Id: <1327307665-23387-2-git-send-email-jrollins@finestructure.net>\r
37 X-Mailer: git-send-email 1.7.8.3\r
38 In-Reply-To: <1327307665-23387-1-git-send-email-jrollins@finestructure.net>\r
39 References: <87pqea24z0.fsf@servo.finestructure.net>\r
40         <1327307665-23387-1-git-send-email-jrollins@finestructure.net>\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, 23 Jan 2012 08:35:14 -0000\r
54 \r
55 This function is now just for archiving the current thread.  A new\r
56 function is created to archive-then-next.  The 'a' key binding is\r
57 updated accordingly.\r
58 \r
59 This will allow people to bind to the simple thread archiving function\r
60 without the extra navigation.  The archive-thread function now also\r
61 takes a prefix to unarchive the current thread (ie. put the whole\r
62 thread back in the inbox).\r
63 ---\r
64  emacs/notmuch-show.el |   23 +++++++++++++++++------\r
65  1 files changed, 17 insertions(+), 6 deletions(-)\r
66 \r
67 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
68 index 9638f35..21a655a 100644\r
69 --- a/emacs/notmuch-show.el\r
70 +++ b/emacs/notmuch-show.el\r
71 @@ -1043,7 +1043,7 @@ thread id.  If a prefix is given, crypto processing is toggled."\r
72         (define-key map "-" 'notmuch-show-remove-tag)\r
73         (define-key map "+" 'notmuch-show-add-tag)\r
74         (define-key map "x" 'notmuch-show-archive-thread-then-exit)\r
75 -       (define-key map "a" 'notmuch-show-archive-thread)\r
76 +       (define-key map "a" 'notmuch-show-archive-thread-then-next)\r
77         (define-key map "N" 'notmuch-show-next-message)\r
78         (define-key map "P" 'notmuch-show-previous-message)\r
79         (define-key map "n" 'notmuch-show-next-open-message)\r
80 @@ -1303,7 +1303,7 @@ thread from the search from which this thread was originally\r
81  shown."\r
82    (interactive)\r
83    (if (notmuch-show-advance)\r
84 -      (notmuch-show-archive-thread)))\r
85 +      (notmuch-show-archive-thread-then-next)))\r
86  \r
87  (defun notmuch-show-rewind ()\r
88    "Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]).\r
89 @@ -1558,8 +1558,12 @@ added."\r
90           (if show-next\r
91               (notmuch-search-show-thread))))))\r
92  \r
93 -(defun notmuch-show-archive-thread ()\r
94 -  "Archive each message in thread, then show next thread from search.\r
95 +(defun notmuch-show-archive-thread (&optional unarchive)\r
96 +  "Archive each message in thread.\r
97 +\r
98 +If a prefix argument is given, the messages will be\r
99 +\"unarchived\" (ie. the \"inbox\" tag will be added instead of\r
100 +removed).\r
101  \r
102  Archive each message currently shown by removing the \"inbox\"\r
103  tag from each. Then kill this buffer and show the next thread\r
104 @@ -1569,14 +1573,21 @@ Note: This command is safe from any race condition of new messages\r
105  being delivered to the same thread. It does not archive the\r
106  entire thread, but only the messages shown in the current\r
107  buffer."\r
108 +  (interactive "P")\r
109 +  (if unarchive\r
110 +      (notmuch-show-add-tag-thread "inbox")\r
111 +    (notmuch-show-remove-tag-thread "inbox")))\r
112 +\r
113 +(defun notmuch-show-archive-thread-then-next ()\r
114 +  "Archive each message in thread, then show next thread from search."\r
115    (interactive)\r
116 -  (notmuch-show-remove-tag-thread "inbox")\r
117 +  (notmuch-show-archive-thread)\r
118    (notmuch-show-next-thread t))\r
119  \r
120  (defun notmuch-show-archive-thread-then-exit ()\r
121    "Archive each message in thread, then exit back to search results."\r
122    (interactive)\r
123 -  (notmuch-show-remove-tag-thread "inbox")\r
124 +  (notmuch-show-archive-thread)\r
125    (notmuch-show-next-thread))\r
126  \r
127  (defun notmuch-show-stash-cc ()\r
128 -- \r
129 1.7.8.3\r
130 \r