1 Return-Path: <markwalters1009@gmail.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 C23DE429E43
\r
6 for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 16:37:22 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id o3glJMJ6HnkS for <notmuch@notmuchmail.org>;
\r
18 Thu, 13 Jun 2013 16:37:18 -0700 (PDT)
\r
19 Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com
\r
20 [74.125.83.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 CA1EB429E34 for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 16:37:15 -0700
\r
24 Received: by mail-ee0-f43.google.com with SMTP id l10so4764387eei.16
\r
25 for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 16:37:14 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=s9PlFSvD719GHhbQA8nvfdMYkp4ruD2IPEKueoyaF8w=;
\r
29 b=Xr3ydZG0My59EjWB+v/4WexwdKbJBL8Ye/iTNrUphnF5Q0iDrA5B0y7StAPTHy02Fh
\r
30 Vss0ihvjMH2ADk9lmKiKQywwCUOuBLxdmD6rTxj3RzwS4gSVvUrNZme2Vql96S6I5U+n
\r
31 3Di+fkBwZKMqpaRAkMQC/r9EX/UH+9ALE6OzgE4TbYTlsxmCBhtAFZLqZf+7mvkp9P0x
\r
32 OY+3VfG25UCXwTd3KJLH9Iedvf5QGAbmSvOc3cbN46JxHy4ChMtG67w/tBLFyx/8GnmF
\r
33 VJ4uuLoXXeCp8temH69jywNPSWvL/ZtnReFeC50V6+yH+5kbK3/m7fgRlbpKWMi9jODz
\r
35 X-Received: by 10.14.5.201 with SMTP id 49mr3758019eel.57.1371166634695;
\r
36 Thu, 13 Jun 2013 16:37:14 -0700 (PDT)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPSA id
\r
39 u11sm46884154eev.12.2013.06.13.16.37.13 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Thu, 13 Jun 2013 16:37:13 -0700 (PDT)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v2 2/2] contrib: pick: thread tagging (including archiving)
\r
46 Date: Fri, 14 Jun 2013 00:36:58 +0100
\r
47 Message-Id: <1371166618-27196-3-git-send-email-markwalters1009@gmail.com>
\r
48 X-Mailer: git-send-email 1.7.9.1
\r
49 In-Reply-To: <1371166618-27196-1-git-send-email-markwalters1009@gmail.com>
\r
50 References: <1371166618-27196-1-git-send-email-markwalters1009@gmail.com>
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.13
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Thu, 13 Jun 2013 23:37:23 -0000
\r
65 Previously pick had no actions based on the entire thread: this adds
\r
66 some. Note in this version '*' is bound to `tag thread' which is not
\r
67 consistent with search or show. However it still might be the most
\r
68 natural thing (as it is similar to running * in the show pane).
\r
70 contrib/notmuch-pick/notmuch-pick.el | 26 ++++++++++++++++++++++++++
\r
71 1 files changed, 26 insertions(+), 0 deletions(-)
\r
73 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
\r
74 index 8030842..642db79 100644
\r
75 --- a/contrib/notmuch-pick/notmuch-pick.el
\r
76 +++ b/contrib/notmuch-pick/notmuch-pick.el
\r
78 (define-key map "q" 'notmuch-pick-quit)
\r
79 (define-key map "x" 'notmuch-pick-quit)
\r
80 (define-key map "?" 'notmuch-help)
\r
81 + (define-key map "A" 'notmuch-pick-archive-thread)
\r
82 (define-key map "a" 'notmuch-pick-archive-message-then-next)
\r
83 (define-key map "=" 'notmuch-pick-refresh-view)
\r
84 (define-key map "s" 'notmuch-pick-to-search)
\r
86 (define-key map "|" 'notmuch-pick-pipe-message)
\r
87 (define-key map "-" 'notmuch-pick-remove-tag)
\r
88 (define-key map "+" 'notmuch-pick-add-tag)
\r
89 + (define-key map "*" 'notmuch-pick-tag-thread)
\r
90 (define-key map " " 'notmuch-pick-scroll-or-next)
\r
91 (define-key map "b" 'notmuch-pick-scroll-message-window-back)
\r
93 @@ -604,6 +606,30 @@ than only the current message."
\r
94 (notmuch-pick-thread-mapcar 'notmuch-pick-get-message-id)
\r
97 +(defun notmuch-pick-tag-thread (&optional tag-changes)
\r
98 + "Tag all messages in the current thread"
\r
100 + (setq tag-changes (notmuch-tag (notmuch-pick-get-messages-ids-thread-search) tag-changes))
\r
101 + (notmuch-pick-thread-mapcar
\r
102 + (lambda () (notmuch-pick-tag-update-display tag-changes))))
\r
104 +(defun notmuch-pick-archive-thread (&optional unarchive)
\r
105 + "Archive each message in thread.
\r
107 +Archive each message currently shown by applying the tag changes
\r
108 +in `notmuch-archive-tags' to each. If a prefix argument is given,
\r
109 +the messages will be \"unarchived\", i.e. the tag changes in
\r
110 +`notmuch-archive-tags' will be reversed.
\r
112 +Note: This command is safe from any race condition of new messages
\r
113 +being delivered to the same thread. It does not archive the
\r
114 +entire thread, but only the messages shown in the current
\r
116 + (interactive "P")
\r
117 + (when notmuch-archive-tags
\r
118 + (notmuch-pick-tag-thread
\r
119 + (notmuch-tag-change-list notmuch-archive-tags unarchive))))
\r
121 ;; Functions below here display the pick buffer itself.
\r
123 (defun notmuch-pick-clean-address (address)
\r