[PATCH 1/5] lib: rename (and negate) set_omit_excluded set_with_excluded
authorMark Walters <markwalters1009@gmail.com>
Sat, 3 Mar 2012 13:05:14 +0000 (13:05 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:12 +0000 (09:45 -0800)
8a/abc671705d4761808071b715f95e00178738c3 [new file with mode: 0644]

diff --git a/8a/abc671705d4761808071b715f95e00178738c3 b/8a/abc671705d4761808071b715f95e00178738c3
new file mode 100644 (file)
index 0000000..6fd5f29
--- /dev/null
@@ -0,0 +1,142 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 651E0431FBC\r
+       for <notmuch@notmuchmail.org>; Sat,  3 Mar 2012 05:03:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id FcdlkmGKudoW for <notmuch@notmuchmail.org>;\r
+       Sat,  3 Mar 2012 05:03:44 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id E6D10431FAF\r
+       for <notmuch@notmuchmail.org>; Sat,  3 Mar 2012 05:03:43 -0800 (PST)\r
+Received: by mail-wi0-f181.google.com with SMTP id o1so697694wic.26\r
+       for <notmuch@notmuchmail.org>; Sat, 03 Mar 2012 05:03:43 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=99ZNVLORcVmb+s8yFoXhDtarvdyLmEZF5wNmGojsaVg=;\r
+       b=yK9mYfN6YFV582ExxyPc1SnCkOKO43jWnZvysRzjUFH0kH2xwXl+Kn0PmO8q4Igniz\r
+       DgQovtox322HYvhzAKCXfBjRMvrWtulMXUYRFFUp3HE1r7pG7FrZn3MIsK9KG8SZGiCC\r
+       yRMu8xUYytIqNGeLMpcJgYLnxW45yTtoUWIF5teXTBzwyQxtVGlH2lP2lzoddKOytaGb\r
+       8+3sc0/5Q7/eVEGL8oS/81OA6jqxgO5W6TinaiEC1JEBMD6oQQqZslO3dYy/yfnt0wRR\r
+       uBloHqV9ld6CK8+jsPpV06sJkoOfTtErF539guDWnGPkx34Z5QoN/AwTi4/+YqrUft2S\r
+       XzUQ==\r
+Received: by 10.180.88.164 with SMTP id bh4mr2991649wib.22.1330779823655;\r
+       Sat, 03 Mar 2012 05:03:43 -0800 (PST)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223])     by mx.google.com with ESMTPS id\r
+ gf3sm9368279wib.6.2012.03.03.05.03.42 (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sat, 03 Mar 2012 05:03:42 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/5] lib: rename (and negate) set_omit_excluded\r
+       set_with_excluded\r
+Date: Sat,  3 Mar 2012 13:05:14 +0000\r
+Message-Id: <1330779918-28024-2-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.2.3\r
+In-Reply-To: <1330779918-28024-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1330779918-28024-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 03 Mar 2012 13:03:46 -0000\r
+\r
+Rename the function notmuch_query_set_omit_excluded_messages to\r
+notmuch_query_set_with_excluded_messages and negate its meaning.  Note\r
+the suite will not compile currently as the callers of\r
+notmuch_query_set_omit_excluded_messages have not been updated yet.\r
+---\r
+ lib/notmuch.h |   12 +++++++-----\r
+ lib/query.cc  |   10 +++++-----\r
+ 2 files changed, 12 insertions(+), 10 deletions(-)\r
+\r
+diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+index babd208..53ec82e 100644\r
+--- a/lib/notmuch.h\r
++++ b/lib/notmuch.h\r
+@@ -449,12 +449,14 @@ typedef enum {\r
+ const char *\r
+ notmuch_query_get_query_string (notmuch_query_t *query);\r
\r
+-/* Specify whether to results should omit the excluded results rather\r
+- * than just marking them excluded. This is useful for passing a\r
+- * notmuch_messages_t not containing the excluded messages to other\r
+- * functions. */\r
++/* Specify whether to results should include the excluded results\r
++ * (marking them excluded) rather than just omitting them. Note when\r
++ * calling notmuch_query_search_threads, the returned thread will\r
++ * contain all messages regardless of this setting but, unless this is\r
++ * set, only threads matching in a non-excluded message will be\r
++ * returned. */\r
+ void\r
+-notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit);\r
++notmuch_query_set_with_excluded_messages (notmuch_query_t *query, notmuch_bool_t with_excluded);\r
\r
+ /* Specify the sorting desired for this query. */\r
+ void\r
+diff --git a/lib/query.cc b/lib/query.cc\r
+index ab18fbc..cf8dfd0 100644\r
+--- a/lib/query.cc\r
++++ b/lib/query.cc\r
+@@ -28,7 +28,7 @@ struct _notmuch_query {\r
+     const char *query_string;\r
+     notmuch_sort_t sort;\r
+     notmuch_string_list_t *exclude_terms;\r
+-    notmuch_bool_t omit_excluded_messages;\r
++    notmuch_bool_t with_excluded;\r
+ };\r
\r
+ typedef struct _notmuch_mset_messages {\r
+@@ -86,7 +86,7 @@ notmuch_query_create (notmuch_database_t *notmuch,\r
\r
+     query->exclude_terms = _notmuch_string_list_create (query);\r
\r
+-    query->omit_excluded_messages = FALSE;\r
++    query->with_excluded = FALSE;\r
\r
+     return query;\r
+ }\r
+@@ -98,9 +98,9 @@ notmuch_query_get_query_string (notmuch_query_t *query)\r
+ }\r
\r
+ void\r
+-notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit)\r
++notmuch_query_set_with_excluded_messages (notmuch_query_t *query, notmuch_bool_t with_excluded)\r
+ {\r
+-    query->omit_excluded_messages = omit;\r
++    query->with_excluded = with_excluded;\r
+ }\r
\r
+ void\r
+@@ -216,7 +216,7 @@ notmuch_query_search_messages (notmuch_query_t *query)\r
+           exclude_query = Xapian::Query (Xapian::Query::OP_AND,\r
+                                          exclude_query, final_query);\r
\r
+-          if (query->omit_excluded_messages)\r
++          if (!query->with_excluded)\r
+               final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,\r
+                                            final_query, exclude_query);\r
+           else {\r
+-- \r
+1.7.2.3\r
+\r