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 0039D431FD5
\r
6 for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:28 -0700 (PDT)
\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 P1Tq12kgE2C1 for <notmuch@notmuchmail.org>;
\r
18 Sat, 11 May 2013 12:50:23 -0700 (PDT)
\r
19 Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com
\r
20 [74.125.82.44]) (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 21A75431FBC for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:21 -0700
\r
24 Received: by mail-wg0-f44.google.com with SMTP id z12so4950818wgg.11
\r
25 for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:20 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to
\r
28 :references; bh=22JM8A7ircSZ6EsHek91NkeZwzH8cR7weUfz92K7r44=;
\r
29 b=k55nM2RPssUBTTujqAlW2DN5dL2VaYXNSF57Ya+o7Domp/YxpKmGyaufigocXoYrJ2
\r
30 wNwq3yy7FR9eflsfgSCZJ/buxtFPDKumczVQ37gH2ZkJZSGvS0IIM//no6LIsYnh2C4C
\r
31 wZhydmXlWzHjQC8m5taeegHKHJ8xdRCIokbf9+ZbCrSl4G6Qs9nEo6x2JyRkXsihPm1B
\r
32 xZ9ZTX8o656ga8+zqdUmRwivv4IvHiaIfHtyf1HB49zZQUwK1a9qTMSFiDzhk9zW8TE1
\r
33 ZaX8qUn6U+udDVdrL2OMsN++52AnYpSV/JA2485pUCDEZARQQkyFi7uBnfqw5PpE+04K
\r
35 X-Received: by 10.180.88.231 with SMTP id bj7mr10360757wib.5.1368301820090;
\r
36 Sat, 11 May 2013 12:50:20 -0700 (PDT)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPSA id q13sm6183188wie.8.2013.05.11.12.50.19
\r
39 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Sat, 11 May 2013 12:50:19 -0700 (PDT)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v2 2/8] cli: add --exclude=all option to notmuch-search.c
\r
45 Date: Sat, 11 May 2013 20:50:03 +0100
\r
46 Message-Id: <1368301809-12532-3-git-send-email-markwalters1009@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.9.1
\r
48 In-Reply-To: <1368301809-12532-1-git-send-email-markwalters1009@gmail.com>
\r
49 References: <1368301809-12532-1-git-send-email-markwalters1009@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Sat, 11 May 2013 19:50:29 -0000
\r
64 Add a --exclude=all option to notmuch search.
\r
66 notmuch-search.c | 8 ++++++--
\r
67 1 files changed, 6 insertions(+), 2 deletions(-)
\r
69 diff --git a/notmuch-search.c b/notmuch-search.c
\r
70 index e658639..4323201 100644
\r
71 --- a/notmuch-search.c
\r
72 +++ b/notmuch-search.c
\r
73 @@ -287,6 +287,7 @@ enum {
\r
81 @@ -334,6 +335,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])
\r
82 (notmuch_keyword_t []){ { "true", EXCLUDE_TRUE },
\r
83 { "false", EXCLUDE_FALSE },
\r
84 { "flag", EXCLUDE_FLAG },
\r
85 + { "all", EXCLUDE_ALL },
\r
87 { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },
\r
88 { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0 },
\r
89 @@ -400,7 +402,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])
\r
90 exclude = EXCLUDE_FALSE;
\r
93 - if (exclude == EXCLUDE_TRUE || exclude == EXCLUDE_FLAG) {
\r
94 + if (exclude != EXCLUDE_FALSE) {
\r
95 const char **search_exclude_tags;
\r
96 size_t search_exclude_tags_length;
\r
98 @@ -409,7 +411,9 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])
\r
99 for (i = 0; i < search_exclude_tags_length; i++)
\r
100 notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
101 if (exclude == EXCLUDE_FLAG)
\r
102 - notmuch_query_set_omit_excluded (query, FALSE);
\r
103 + notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_FALSE);
\r
104 + if (exclude == EXCLUDE_ALL)
\r
105 + notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_ALL);
\r