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 D9890431FAE
\r
6 for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:51:05 -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 1ib3ImFTFC-2 for <notmuch@notmuchmail.org>;
\r
18 Sat, 11 May 2013 12:51:01 -0700 (PDT)
\r
19 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com
\r
20 [209.85.212.173]) (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 ACD26431FDD
\r
23 for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:31 -0700 (PDT)
\r
24 Received: by mail-wi0-f173.google.com with SMTP id hi5so281109wib.12
\r
25 for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:30 -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=981UU8GE8YiXCbx03ngSal7tvfZmodaJoP/W04TkoKE=;
\r
29 b=wKyAayTVuMpaE9UTy3Blcv9b2E/KKX/ueuCi+4Ie6UTjOyeqK24wttD2j6m06t9OfH
\r
30 SU5/aFv5nwd68ajKQyYUx1/9Vo0bEi8D5PfKa8za/xmq61kjLe/Rl3vQadSqAH8GXNo+
\r
31 HdCEM9bJ/Z4jqU5NDDvQlHaAp4PziZ3yZL7OpMQMYxdszN3HLYx2kevYkPkBzqTD1Z3O
\r
32 67qWQeWX148Ioo0TxwzhIBlpIUdOTThr/Ymtv1aF9HQijzWu5iW+fMWeqm3dvZTAasMy
\r
33 YZaxd0QQhsPP7ULN+/0tvf5h3M4t66WIrGHFPqcS4lHxBpCIX2/Yy5iF9stC4tZzoBWB
\r
35 X-Received: by 10.194.61.45 with SMTP id m13mr31461375wjr.20.1368301830645;
\r
36 Sat, 11 May 2013 12:50:30 -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 ek7sm5689751wic.4.2013.05.11.12.50.29
\r
39 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Sat, 11 May 2013 12:50:30 -0700 (PDT)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v2 7/8] lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t
\r
45 Date: Sat, 11 May 2013 20:50:08 +0100
\r
46 Message-Id: <1368301809-12532-8-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:51:06 -0000
\r
64 From: Peter Wang <novalazy@gmail.com>
\r
66 Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can
\r
67 cover all four values of search --exclude in the cli.
\r
70 lib/query.cc | 6 ++++--
\r
71 notmuch-search.c | 2 +-
\r
72 3 files changed, 6 insertions(+), 3 deletions(-)
\r
74 diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
75 index 27b43ff..35795bb 100644
\r
78 @@ -504,6 +504,7 @@ notmuch_query_get_query_string (notmuch_query_t *query);
\r
80 NOTMUCH_EXCLUDE_FALSE,
\r
81 NOTMUCH_EXCLUDE_TRUE,
\r
82 + NOTMUCH_EXCLUDE_FLAG,
\r
84 } notmuch_exclude_t;
\r
86 diff --git a/lib/query.cc b/lib/query.cc
\r
87 index 1cc768f..e61d11e 100644
\r
90 @@ -221,10 +221,12 @@ notmuch_query_search_messages (notmuch_query_t *query)
\r
91 if (query->exclude_terms) {
\r
92 exclude_query = _notmuch_exclude_tags (query, final_query);
\r
94 - if (query->omit_excluded != NOTMUCH_EXCLUDE_FALSE)
\r
95 + if (query->omit_excluded == NOTMUCH_EXCLUDE_TRUE ||
\r
96 + query->omit_excluded == NOTMUCH_EXCLUDE_ALL)
\r
98 final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
\r
99 final_query, exclude_query);
\r
102 exclude_query = Xapian::Query (Xapian::Query::OP_AND,
\r
103 exclude_query, final_query);
\r
105 diff --git a/notmuch-search.c b/notmuch-search.c
\r
106 index 4323201..a20791a 100644
\r
107 --- a/notmuch-search.c
\r
108 +++ b/notmuch-search.c
\r
109 @@ -411,7 +411,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])
\r
110 for (i = 0; i < search_exclude_tags_length; i++)
\r
111 notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
112 if (exclude == EXCLUDE_FLAG)
\r
113 - notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_FALSE);
\r
114 + notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_FLAG);
\r
115 if (exclude == EXCLUDE_ALL)
\r
116 notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_ALL);
\r