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 12E78431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 12:30:41 -0700 (PDT)
\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 NarNoymHCfPB for <notmuch@notmuchmail.org>;
\r
17 Mon, 20 Oct 2014 12:30:37 -0700 (PDT)
\r
18 Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com
\r
19 [209.85.217.177]) (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 DCA4E431FAE
\r
22 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 12:30:36 -0700 (PDT)
\r
23 Received: by mail-lb0-f177.google.com with SMTP id w7so4502667lbi.36
\r
24 for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 12:30:35 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=date:from:to:message-id:in-reply-to:references:subject:mime-version
\r
27 :content-type:content-transfer-encoding;
\r
28 bh=V5Iljf0RWDAjpuSxV+iFShMqnEBD7FKTly97+dnsPcc=;
\r
29 b=Nn/tLGBfIkYily0zHzcTdr3YGyteyufimkWuBpYks9P9OckTwcyr/hFIHu1OTJgtL4
\r
30 GMl0dOZNqOHq3grhR9T5qGvJiX1RHp9r1O5jkfqI6zMrdlfE3SAxkcy0h8j8tEmaUbUw
\r
31 fu1G2YoR9x4bkh7sfKPnn4cbotKmT0FU4Yc66OEbhJyP2ZrzXuAwcuaZbpm4VJu4rTji
\r
32 jU6PkZ7Ot3F2EcCoEY1Ci6y0vKfVNol3qqIrla4eIP4XrLdPZ+MSS5kJkBY0fzX+GqcR
\r
33 F140C8NKgNdCgmoSWbCCit9M977JjAgxDrRjX7znk9TWE0fhP9ISR4jxZaGqVD4cEObU
\r
35 X-Received: by 10.152.25.130 with SMTP id c2mr11614565lag.80.1413833435352;
\r
36 Mon, 20 Oct 2014 12:30:35 -0700 (PDT)
\r
37 Received: from localhost (p5B00FFDE.dip0.t-ipconnect.de. [91.0.255.222])
\r
38 by mx.google.com with ESMTPSA id
\r
39 ju20sm3608028lab.14.2014.10.20.12.30.33 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Mon, 20 Oct 2014 12:30:34 -0700 (PDT)
\r
42 Date: Mon, 20 Oct 2014 21:30:46 +0200
\r
43 From: Franz Fellner <alpine.art.de@gmail.com>
\r
44 To: Franz Fellner <alpine.art.de@gmail.com>,
\r
45 notmuch@notmuchmail.org
\r
46 Message-ID: <544562e67550f_25b371be9894@TP_L520.notmuch>
\r
47 In-Reply-To: <20141017180750.GE20696@TP_L520.localdomain>
\r
48 References: <20141017180750.GE20696@TP_L520.localdomain>
\r
49 Subject: RE: [PATCH] VIM: Respect exclude_tags specified in .notmuch-config
\r
51 Content-Type: text/plain;
\r
53 Content-Transfer-Encoding: 7bit
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Mon, 20 Oct 2014 19:30:41 -0000
\r
68 Exclude mails tagged with any tag specified in
\r
69 notmuch config get search.exclude_tags
\r
70 in folders list and search list.
\r
72 diff --git a/vim/notmuch.vim b/vim/notmuch.vim
\r
73 index 5c86fcd..522a366 100644
\r
74 --- a/vim/notmuch.vim
\r
75 +++ b/vim/notmuch.vim
\r
76 @@ -647,6 +647,7 @@ ruby << EOF
\r
79 $email = $email_name = $email_address = nil
\r
80 + $exclude_tags = []
\r
84 @@ -672,6 +673,8 @@ ruby << EOF
\r
85 # Add the primary to this too as we use it for checking
\r
86 # addresses when doing a reply
\r
87 $all_emails.unshift($email_address)
\r
88 + ignore_tags = get_config_item('search.exclude_tags')
\r
89 + $exclude_tags = ignore_tags.split("\n")
\r
93 @@ -859,6 +862,9 @@ ruby << EOF
\r
95 folders.each do |name, search|
\r
96 q = $curbuf.query(search)
\r
97 + $exclude_tags.each { |t|
\r
98 + q.add_tag_exclude(t)
\r
100 $searches << search
\r
101 count = count_threads ? q.search_threads.count : q.search_messages.count
\r
103 @@ -874,6 +880,9 @@ ruby << EOF
\r
104 date_fmt = VIM::evaluate('g:notmuch_date_format')
\r
105 q = $curbuf.query(search)
\r
106 q.sort = Notmuch::SORT_NEWEST_FIRST
\r
107 + $exclude_tags.each { |t|
\r
108 + q.add_tag_exclude(t)
\r
111 t = q.search_threads
\r