1 Return-Path: <alpine.art.de@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 00FD2431FC9
\r
6 for <notmuch@notmuchmail.org>; Thu, 22 Jan 2015 04:52:52 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=1.639 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 DNS_FROM_AHBL_RHSBL=2.438, 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 ksD95YEkKCvl for <notmuch@notmuchmail.org>;
\r
18 Thu, 22 Jan 2015 04:52:48 -0800 (PST)
\r
19 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com
\r
20 [74.125.82.50]) (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 86543431FBC for <notmuch@notmuchmail.org>; Thu, 22 Jan 2015 04:52:48 -0800
\r
24 Received: by mail-wg0-f50.google.com with SMTP id b13so1525099wgh.9
\r
25 for <notmuch@notmuchmail.org>; Thu, 22 Jan 2015 04:52:47 -0800 (PST)
\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:in-reply-to:references;
\r
28 bh=z27BLIItK08XIIhVks+AWV9mpddQEr9y9hYZjhytXyc=;
\r
29 b=xNMadCg8ku3bkBLd/GvEZ+juQFARFjwe9jHsjjSLWEm71hOdGK5Y8HcG7gQ8dVbqUp
\r
30 kkCmNPNH+N4KFBKlGRiv8Jmz6Pnqgyz8VVZznpsj7ifIeLSoQ11twwLcSNkxJjM6Gjkd
\r
31 412baQRVHMdC3w8Q2boIjG1otQ6KtoYpd3+lRq3PvMIJm3n8XdD4QLCsKG3zFdjEpKPn
\r
32 PL9n+dD+DIat+1F4mw9DyXht/uT0cwxTWTNfi1KD9kwZQxWQoiKvwldUMvuFfXcPq3DM
\r
33 qrhTpaT1QGXgW/GHCG+ULqSyF7rA2jNACwjVIYcNYP49zlLTAT241Nvuf8zXmUIGpaX/
\r
35 X-Received: by 10.180.13.7 with SMTP id d7mr4929455wic.57.1421931167285;
\r
36 Thu, 22 Jan 2015 04:52:47 -0800 (PST)
\r
37 Received: from localhost (p4FFB8A19.dip0.t-ipconnect.de. [79.251.138.25])
\r
38 by mx.google.com with ESMTPSA id ej10sm2952621wib.2.2015.01.22.04.52.45
\r
39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
40 Thu, 22 Jan 2015 04:52:45 -0800 (PST)
\r
41 From: Franz Fellner <alpine.art.de@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v2] VIM: Exclude mails tagged with any tag specified in
\r
44 'notmuch config get search.exclude_tags' in folders list and
\r
46 Date: Thu, 22 Jan 2015 13:52:47 +0100
\r
47 Message-Id: <1421931167-22066-1-git-send-email-alpine.art.de@gmail.com>
\r
48 X-Mailer: git-send-email 2.2.1
\r
49 In-Reply-To: <20141017180750.GE20696@TP_L520.localdomain>
\r
50 References: <20141017180750.GE20696@TP_L520.localdomain>
\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, 22 Jan 2015 12:52:52 -0000
\r
66 vim/notmuch.vim | 9 +++++++++
\r
67 1 file changed, 9 insertions(+)
\r
69 diff --git a/vim/notmuch.vim b/vim/notmuch.vim
\r
70 index cad9517..cb6695a 100644
\r
71 --- a/vim/notmuch.vim
\r
72 +++ b/vim/notmuch.vim
\r
73 @@ -477,6 +477,7 @@ ruby << EOF
\r
76 $email = $email_name = $email_address = nil
\r
77 + $exclude_tags = []
\r
81 @@ -496,6 +497,8 @@ ruby << EOF
\r
82 $email_address = get_config_item('user.primary_email')
\r
83 $email_name = get_config_item('user.name')
\r
84 $email = "%s <%s>" % [$email_name, $email_address]
\r
85 + ignore_tags = get_config_item('search.exclude_tags')
\r
86 + $exclude_tags = ignore_tags.split("\n")
\r
90 @@ -637,6 +640,9 @@ ruby << EOF
\r
92 folders.each do |name, search|
\r
93 q = $curbuf.query(search)
\r
94 + $exclude_tags.each { |t|
\r
95 + q.add_tag_exclude(t)
\r
98 count = count_threads ? q.search_threads.count : q.search_messages.count
\r
99 b << "%9d %-20s (%s)" % [count, name, search]
\r
100 @@ -648,6 +654,9 @@ ruby << EOF
\r
101 date_fmt = VIM::evaluate('g:notmuch_date_format')
\r
102 q = $curbuf.query(search)
\r
103 q.sort = Notmuch::SORT_NEWEST_FIRST
\r
104 + $exclude_tags.each { |t|
\r
105 + q.add_tag_exclude(t)
\r
108 t = q.search_threads
\r