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 0F229431FD6
\r
6 for <notmuch@notmuchmail.org>; Thu, 15 Mar 2012 11:42:13 -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 0qbp+gyVxt7o for <notmuch@notmuchmail.org>;
\r
18 Thu, 15 Mar 2012 11:42:12 -0700 (PDT)
\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 28544431FAE
\r
23 for <notmuch@notmuchmail.org>; Thu, 15 Mar 2012 11:42:12 -0700 (PDT)
\r
24 Received: by mail-we0-f181.google.com with SMTP id m13so3528469wer.26
\r
25 for <notmuch@notmuchmail.org>; Thu, 15 Mar 2012 11:42:11 -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=xKCmup4gLeKkAACbdBvgh+KbOf04zAWD+zyXqm1NWwA=;
\r
29 b=YIxDMW4MXDvnBUKtTeJqXxaLzvZSWxh8xvL4h+jn6QJxTuONh8RG3QKhsEqBvE9H2t
\r
30 e3+50cg78z5WoRYU+ATRrxz2ORCmsT+GP0zOoTyiQOk/ZXYUywcetPeAf75b8B2VIJs+
\r
31 9qAW8nxBmzAnTiKb8lDHnLwMNY6c0J5KNuA+uiNmQiqXboxCsF8dFCSPPHNz1qYjbAsd
\r
32 AEPNiCUK5HamyIAs3VbkY9eMro4LrsZVzGjRjTPRlhkrRF+J5oNdRkm4lwaGlWBqwBfP
\r
33 j5f1HHFCZ3USCD3t5aG3TlgXw1rcOVMScGaVLLcLa6cAtIwzwaWkvmUgu8jxr5EqdXmJ
\r
35 Received: by 10.180.85.70 with SMTP id f6mr28973878wiz.5.1331836931746;
\r
36 Thu, 15 Mar 2012 11:42:11 -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 bg3sm7016438wib.10.2012.03.15.11.42.10 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Thu, 15 Mar 2012 11:42:10 -0700 (PDT)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH 1/5] lib: change default for notmuch_query_set_omit_excluded
\r
44 Date: Thu, 15 Mar 2012 18:42:01 +0000
\r
45 Message-Id: <1331836925-31437-2-git-send-email-markwalters1009@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.9.1
\r
47 In-Reply-To: <1331836925-31437-1-git-send-email-markwalters1009@gmail.com>
\r
48 References: <1331836925-31437-1-git-send-email-markwalters1009@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Thu, 15 Mar 2012 18:42:13 -0000
\r
64 lib/notmuch.h | 11 ++++++-----
\r
65 lib/query.cc | 10 +++++-----
\r
66 2 files changed, 11 insertions(+), 10 deletions(-)
\r
68 diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
69 index babd208..029a2c3 100644
\r
72 @@ -449,12 +449,13 @@ typedef enum {
\r
74 notmuch_query_get_query_string (notmuch_query_t *query);
\r
76 -/* Specify whether to results should omit the excluded results rather
\r
77 - * than just marking them excluded. This is useful for passing a
\r
78 - * notmuch_messages_t not containing the excluded messages to other
\r
80 +/* Specify whether to omit the excluded results or just flag
\r
81 + * them. Note when calling notmuch_query_search_threads, the returned
\r
82 + * thread will contain all messages regardless of this setting but,
\r
83 + * unless this is unset, only threads matching in a non-excluded
\r
84 + * message will be returned. */
\r
86 -notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit);
\r
87 +notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit_excluded);
\r
89 /* Specify the sorting desired for this query. */
\r
91 diff --git a/lib/query.cc b/lib/query.cc
\r
92 index 2b73d72..44fc0ab 100644
\r
95 @@ -28,7 +28,7 @@ struct _notmuch_query {
\r
96 const char *query_string;
\r
97 notmuch_sort_t sort;
\r
98 notmuch_string_list_t *exclude_terms;
\r
99 - notmuch_bool_t omit_excluded_messages;
\r
100 + notmuch_bool_t omit_excluded;
\r
103 typedef struct _notmuch_mset_messages {
\r
104 @@ -86,7 +86,7 @@ notmuch_query_create (notmuch_database_t *notmuch,
\r
106 query->exclude_terms = _notmuch_string_list_create (query);
\r
108 - query->omit_excluded_messages = FALSE;
\r
109 + query->omit_excluded = TRUE;
\r
113 @@ -98,9 +98,9 @@ notmuch_query_get_query_string (notmuch_query_t *query)
\r
117 -notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit)
\r
118 +notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit_excluded)
\r
120 - query->omit_excluded_messages = omit;
\r
121 + query->omit_excluded = omit_excluded;
\r
125 @@ -214,7 +214,7 @@ notmuch_query_search_messages (notmuch_query_t *query)
\r
126 if (query->exclude_terms) {
\r
127 exclude_query = _notmuch_exclude_tags (query, final_query);
\r
129 - if (query->omit_excluded_messages)
\r
130 + if (query->omit_excluded)
\r
131 final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
\r
132 final_query, exclude_query);
\r