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 CA1AB431FAF
\r
6 for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 14:03:22 -0800 (PST)
\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 8ZK-tCI6QElI for <notmuch@notmuchmail.org>;
\r
18 Thu, 19 Jan 2012 14:03:22 -0800 (PST)
\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
20 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 3C89F431FAE
\r
23 for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 14:03:22 -0800 (PST)
\r
24 Received: by werp13 with SMTP id p13so417690wer.26
\r
25 for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 14:03:21 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=KO8oQvdtaPFzxIpaaFgXnHIJuU+MxQQ3e1kgGkr1FR0=;
\r
29 b=bLzYEO3l/sDcqdZ+U2MmAbiovjoXYYNU5nxxhTZljjyFfStHkkqdKmH6MGLY2ioVL2
\r
30 fl7RFjtP0apEfFhObBk6UIzjxuPpt/LL8Cw8Q8KpLS1PNrZ/+o1NvgltsaO1qrF04ize
\r
31 8RiLBhx5UuNHmISuEq3BTaHxBMy2uhX8vFSkU=
\r
32 Received: by 10.216.133.141 with SMTP id q13mr1397854wei.1.1327010601025;
\r
33 Thu, 19 Jan 2012 14:03:21 -0800 (PST)
\r
34 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.
\r
35 [94.192.233.223]) by mx.google.com with ESMTPS id
\r
36 fy5sm2275480wib.7.2012.01.19.14.03.19 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Thu, 19 Jan 2012 14:03:20 -0800 (PST)
\r
38 From: Mark Walters <markwalters1009@gmail.com>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH] Automatically exclude tags in notmuch-show
\r
41 Date: Thu, 19 Jan 2012 22:03:03 +0000
\r
42 Message-Id: <1327010583-23954-1-git-send-email-markwalters1009@gmail.com>
\r
43 X-Mailer: git-send-email 1.7.2.3
\r
44 In-Reply-To: <874nvric7c.fsf@qmul.ac.uk>
\r
45 References: <874nvric7c.fsf@qmul.ac.uk>
\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: Thu, 19 Jan 2012 22:03:22 -0000
\r
60 Add the use of auto_exclude_tags in notmuch-show.c. As with Austin's
\r
61 patch (commit 42a907992823030f070fc395a174f779998ca6f5) it just adds
\r
62 the excluded tags to the query so the excluded messages will still
\r
63 appear in the emacs interface, but as a single header line rather than
\r
64 as a matching message.
\r
66 notmuch-show.c | 8 ++++++++
\r
67 1 files changed, 8 insertions(+), 0 deletions(-)
\r
69 diff --git a/notmuch-show.c b/notmuch-show.c
\r
70 index d14dac9..925dfd6 100644
\r
71 --- a/notmuch-show.c
\r
72 +++ b/notmuch-show.c
\r
73 @@ -948,9 +948,12 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
\r
75 const notmuch_show_format_t *format = &format_text;
\r
76 notmuch_show_params_t params;
\r
77 + const char **auto_exclude_tags;
\r
78 + size_t auto_exclude_tags_length;
\r
80 int format_specified = 0;
\r
84 params.entire_thread = 0;
\r
86 @@ -1040,6 +1043,11 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
\r
90 + auto_exclude_tags = notmuch_config_get_auto_exclude_tags
\r
91 + (config, &auto_exclude_tags_length);
\r
92 + for (j = 0; j < auto_exclude_tags_length; j++)
\r
93 + notmuch_query_add_tag_exclude (query, auto_exclude_tags[j]);
\r
95 /* if part was requested and format was not specified, use format=raw */
\r
96 if (params.part >= 0 && !format_specified)
\r
97 format = &format_raw;
\r