Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 89 / 7c1313d60518a219e48bf5f59f881fb9a27e75
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 9DEFC431E82\r
6         for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 15:54:12 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \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 4SoRV1WITlrX for <notmuch@notmuchmail.org>;\r
18         Sat, 31 Mar 2012 15:54:12 -0700 (PDT)\r
19 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com\r
20         [209.85.212.179]) (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 CD3E0431FAE\r
23         for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 15:54:11 -0700 (PDT)\r
24 Received: by wibhn6 with SMTP id hn6so1346075wib.2\r
25         for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 15:54:10 -0700 (PDT)\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:x-mailer:in-reply-to:references;\r
28         bh=eo4x3qOniAZtifC3PD1Jdj4s5WHERevlsxTnlNI1qyY=;\r
29         b=KGJwrKHEG5kKzilRLXVqt8ADeqLNWMmqBhY09Cejpx1XvdvOBPksLnnaxsfL98+Uqu\r
30         kJAO1omtPRcLHmn/3IWz3FFhVhqhlY355pEGw/DTJX8rqGosoC05saDM+m1zgZ3O0GYo\r
31         t+ZKYVgGXTdFCSJIq8sAnqjRlMWIDOt/pp1jmedrXs1xqhiGPr7FuiiZHsg3e/7sSvlZ\r
32         q+kzfUqXdhrOloINPvlymNNkjy7y4j/XSC/iMT9Reps+Bj0VPvz28OPiHksgfbcuqceJ\r
33         PLpRjAQoaSa60xxyvQwD3P938YXzg5gmLAE5LdFvUubVGv4agKJIiApJWGIl5P5/Hw3f\r
34         Wdcg==\r
35 Received: by 10.180.97.4 with SMTP id dw4mr10377024wib.18.1333234450555;\r
36         Sat, 31 Mar 2012 15:54:10 -0700 (PDT)\r
37 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
38  [94.192.233.223])      by mx.google.com with ESMTPS id\r
39  17sm29017490wis.0.2012.03.31.15.54.09  (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sat, 31 Mar 2012 15:54:09 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v2 1/6] lib: change default for\r
44  notmuch_query_set_omit_excluded\r
45 Date: Sat, 31 Mar 2012 23:53:57 +0100\r
46 Message-Id: <1333234442-28616-2-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1333234442-28616-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1333234442-28616-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\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, 31 Mar 2012 22:54:12 -0000\r
63 \r
64 ---\r
65  lib/notmuch.h |   11 ++++++-----\r
66  lib/query.cc  |   10 +++++-----\r
67  2 files changed, 11 insertions(+), 10 deletions(-)\r
68 \r
69 diff --git a/lib/notmuch.h b/lib/notmuch.h\r
70 index babd208..029a2c3 100644\r
71 --- a/lib/notmuch.h\r
72 +++ b/lib/notmuch.h\r
73 @@ -449,12 +449,13 @@ typedef enum {\r
74  const char *\r
75  notmuch_query_get_query_string (notmuch_query_t *query);\r
76  \r
77 -/* Specify whether to results should omit the excluded results rather\r
78 - * than just marking them excluded. This is useful for passing a\r
79 - * notmuch_messages_t not containing the excluded messages to other\r
80 - * functions. */\r
81 +/* Specify whether to omit the excluded results or just flag\r
82 + * them. Note when calling notmuch_query_search_threads, the returned\r
83 + * thread will contain all messages regardless of this setting but,\r
84 + * unless this is unset, only threads matching in a non-excluded\r
85 + * message will be returned. */\r
86  void\r
87 -notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit);\r
88 +notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit_excluded);\r
89  \r
90  /* Specify the sorting desired for this query. */\r
91  void\r
92 diff --git a/lib/query.cc b/lib/query.cc\r
93 index 68ac1e4..f7c7099 100644\r
94 --- a/lib/query.cc\r
95 +++ b/lib/query.cc\r
96 @@ -28,7 +28,7 @@ struct _notmuch_query {\r
97      const char *query_string;\r
98      notmuch_sort_t sort;\r
99      notmuch_string_list_t *exclude_terms;\r
100 -    notmuch_bool_t omit_excluded_messages;\r
101 +    notmuch_bool_t omit_excluded;\r
102  };\r
103  \r
104  typedef struct _notmuch_mset_messages {\r
105 @@ -92,7 +92,7 @@ notmuch_query_create (notmuch_database_t *notmuch,\r
106  \r
107      query->exclude_terms = _notmuch_string_list_create (query);\r
108  \r
109 -    query->omit_excluded_messages = FALSE;\r
110 +    query->omit_excluded = TRUE;\r
111  \r
112      return query;\r
113  }\r
114 @@ -104,9 +104,9 @@ notmuch_query_get_query_string (notmuch_query_t *query)\r
115  }\r
116  \r
117  void\r
118 -notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit)\r
119 +notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit_excluded)\r
120  {\r
121 -    query->omit_excluded_messages = omit;\r
122 +    query->omit_excluded = omit_excluded;\r
123  }\r
124  \r
125  void\r
126 @@ -220,7 +220,7 @@ notmuch_query_search_messages (notmuch_query_t *query)\r
127         if (query->exclude_terms) {\r
128             exclude_query = _notmuch_exclude_tags (query, final_query);\r
129  \r
130 -           if (query->omit_excluded_messages)\r
131 +           if (query->omit_excluded)\r
132                 final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,\r
133                                              final_query, exclude_query);\r
134             else {\r
135 -- \r
136 1.7.9.1\r
137 \r