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 6276F429E53
\r
6 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 18:27:50 -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 Jw4jSYw8Z7Pp for <notmuch@notmuchmail.org>;
\r
17 Sun, 29 Jan 2012 18:27:50 -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 630B1431FBC
\r
22 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 18:27:49 -0800 (PST)
\r
23 Received: by mail-bk0-f53.google.com with SMTP id 11so960274bke.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 18:27:49 -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=cWcLrqd0t/9xBBnQ5QFqnmh67JXEkGFQDJFWtr9XZ/8=;
\r
28 b=D+Hdqd5vFjqst34x8C5iAUHv+OhCZVURIxGFOD9aFuTAn65TKJZmgNWE9FGHGr2DTd
\r
29 ux89VjDJ01bm2mUMzIN1NTBzWByrpKcDcYmRw0Qi6Ps+pkAMe2fp7Eopc1YVTxKaFcjL
\r
30 DGxY6w40rDHzsmImc1uRrOAYCx5lF/1XnIU6U=
\r
31 Received: by 10.205.120.138 with SMTP id fy10mr7777046bkc.118.1327890469140;
\r
32 Sun, 29 Jan 2012 18:27:49 -0800 (PST)
\r
33 Received: from localhost ([91.144.186.21])
\r
34 by mx.google.com with ESMTPS id o26sm28043314bko.14.2012.01.29.18.27.48
\r
35 (version=TLSv1/SSLv3 cipher=OTHER);
\r
36 Sun, 29 Jan 2012 18:27:48 -0800 (PST)
\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH v2 07/13] emacs: add "*" binding for notmuch-show view
\r
40 Date: Mon, 30 Jan 2012 06:26:16 +0400
\r
41 Message-Id: <1327890382-548-8-git-send-email-dmitry.kurochkin@gmail.com>
\r
42 X-Mailer: git-send-email 1.7.8.3
\r
43 In-Reply-To: <1327890382-548-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
44 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
45 <1327890382-548-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Mon, 30 Jan 2012 02:27:50 -0000
\r
60 The patch adds `notmuch-show-tag-all' function bound to "*" in
\r
61 notmuch-show view. The function is similar to the
\r
62 `notmuch-search-tag-all' function for the notmuch-search view: it
\r
63 changes tags for all messages in the current thread.
\r
65 emacs/notmuch-show.el | 15 +++++++++++++++
\r
66 1 files changed, 15 insertions(+), 0 deletions(-)
\r
68 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
69 index 11dab2d..0d90c1e 100644
\r
70 --- a/emacs/notmuch-show.el
\r
71 +++ b/emacs/notmuch-show.el
\r
72 @@ -1073,6 +1073,7 @@ thread id. If a prefix is given, crypto processing is toggled."
\r
73 (define-key map "c" 'notmuch-show-stash-map)
\r
74 (define-key map "=" 'notmuch-show-refresh-view)
\r
75 (define-key map "h" 'notmuch-show-toggle-headers)
\r
76 + (define-key map "*" 'notmuch-show-tag-all)
\r
77 (define-key map "-" 'notmuch-show-remove-tag)
\r
78 (define-key map "+" 'notmuch-show-add-tag)
\r
79 (define-key map "x" 'notmuch-show-archive-thread-then-exit)
\r
80 @@ -1488,6 +1489,20 @@ TAG-CHANGES is a list of tag operations for `notmuch-tag'."
\r
81 initial-input (notmuch-show-get-message-id))))
\r
82 (apply 'notmuch-show-tag-message tag-changes)))
\r
84 +(defun notmuch-show-tag-all (&rest tag-changes)
\r
85 + "Change tags for all messages in the current thread.
\r
87 +TAG-CHANGES is a list of tag operations for `notmuch-tag'."
\r
88 + (interactive (notmuch-read-tag-changes nil notmuch-show-thread-id))
\r
89 + (apply 'notmuch-tag notmuch-show-thread-id tag-changes)
\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 tag-changes)))
\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