1 Return-Path: <dmitry.kurochkin@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 6BCA7431FBC
\r
6 for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 20:42:51 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, 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 F14em3RUWNTE for <notmuch@notmuchmail.org>;
\r
17 Fri, 27 Jan 2012 20:42:49 -0800 (PST)
\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com
\r
19 [209.85.214.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 30849431FD2
\r
22 for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 20:42:40 -0800 (PST)
\r
23 Received: by mail-bk0-f53.google.com with SMTP id zt19so2255515bkb.26
\r
24 for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 20:42:39 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=yl7aFDnK+K1NlXaiWVuzmUQ6o/aIJyXl6ul29D4daAc=;
\r
28 b=gFpvR2a7W3TsQohI37ka8nImaL0sQref+jvErRKyB187Enw0B3S0cDkPLaZUzsa+aj
\r
29 8amOo7QEp9Pzph2CPQXW9HStN7NeC0hmYY5VVfzRAIvCiTIgobYRwis9PitTMFNmc0g/
\r
30 upDT9YaW1nIZuHU1TB0A44cUTRrRWfew5Mj5c=
\r
31 Received: by 10.204.154.140 with SMTP id o12mr4416125bkw.102.1327725759902;
\r
32 Fri, 27 Jan 2012 20:42:39 -0800 (PST)
\r
33 Received: from localhost ([91.144.186.21])
\r
34 by mx.google.com with ESMTPS id cz3sm20740671bkb.3.2012.01.27.20.42.39
\r
35 (version=TLSv1/SSLv3 cipher=OTHER);
\r
36 Fri, 27 Jan 2012 20:42:39 -0800 (PST)
\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 5/6] emacs: add "*" binding for notmuch-show view
\r
40 Date: Sat, 28 Jan 2012 08:41:23 +0400
\r
41 Message-Id: <1327725684-5887-5-git-send-email-dmitry.kurochkin@gmail.com>
\r
42 X-Mailer: git-send-email 1.7.8.3
\r
43 In-Reply-To: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
44 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
45 X-BeenThere: notmuch@notmuchmail.org
\r
46 X-Mailman-Version: 2.1.13
\r
48 List-Id: "Use and development of the notmuch mail system."
\r
49 <notmuch.notmuchmail.org>
\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
53 List-Post: <mailto:notmuch@notmuchmail.org>
\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
57 X-List-Received-Date: Sat, 28 Jan 2012 04:42:52 -0000
\r
59 The patch adds `notmuch-show-operate-all' function bound to "*" in
\r
60 notmuch-show view. The function is similar to the
\r
61 `notmuch-search-operate-all' function for the notmuch-search view: it
\r
62 changes tags for all messages in the current thread.
\r
64 emacs/notmuch-show.el | 16 ++++++++++++++++
\r
65 1 files changed, 16 insertions(+), 0 deletions(-)
\r
67 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
68 index 03eadfb..2ca4d92 100644
\r
69 --- a/emacs/notmuch-show.el
\r
70 +++ b/emacs/notmuch-show.el
\r
71 @@ -1073,6 +1073,7 @@ thread id. If a prefix is given, crypto processing is toggled."
\r
72 (define-key map "c" 'notmuch-show-stash-map)
\r
73 (define-key map "=" 'notmuch-show-refresh-view)
\r
74 (define-key map "h" 'notmuch-show-toggle-headers)
\r
75 + (define-key map "*" 'notmuch-show-operate-all)
\r
76 (define-key map "-" 'notmuch-show-remove-tag)
\r
77 (define-key map "+" 'notmuch-show-add-tag)
\r
78 (define-key map "x" 'notmuch-show-archive-thread-then-exit)
\r
79 @@ -1489,6 +1490,21 @@ i.e. a list of tags to change with '+' and '-' prefixes."
\r
80 initial-input (notmuch-show-get-message-id))))
\r
81 (apply 'notmuch-show-tag-message changed-tags)))
\r
83 +(defun notmuch-show-operate-all (&rest changed-tags)
\r
84 + "Change tags for all messages in the current thread.
\r
86 +`Changed-tags' is a list of tag operations for \"notmuch tag\",
\r
87 +i.e. a list of tags to change with '+' and '-' prefixes."
\r
88 + (interactive (notmuch-select-tags-with-completion nil notmuch-show-thread-id))
\r
89 + (apply 'notmuch-tag notmuch-show-thread-id changed-tags)
\r
91 + (goto-char (point-min))
\r
92 + (loop do (let* ((current-tags (notmuch-show-get-tags))
\r
93 + (new-tags (notmuch-update-tags current-tags changed-tags)))
\r
94 + (unless (equal current-tags new-tags)
\r
95 + (notmuch-show-set-tags new-tags)))
\r
96 + while (notmuch-show-goto-message-next))))
\r
98 (defun notmuch-show-add-tag ()
\r
99 "Same as `notmuch-show-tag' but sets initial input to '+'."
\r