--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\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 1D48F429E34\r
+ for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 03:39:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 0RnTGWMhjgf2 for <notmuch@notmuchmail.org>;\r
+ Tue, 31 Jan 2012 03:39:00 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 5A4C5431E64\r
+ for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 03:39:00 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1RsC35-0002PT-BP; Tue, 31 Jan 2012 11:38:55 +0000\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+ helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1RsC34-0006DK-QH; Tue, 31 Jan 2012 11:38:55 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: [PATCH 1/7] cli: add --do-not-exclude option to count and search.\r
+In-Reply-To: <20120131041732.GY17991@mit.edu>\r
+References: <8762fu4aqt.fsf@qmul.ac.uk>\r
+ <1327862394-14334-1-git-send-email-markwalters1009@gmail.com>\r
+ <20120131041732.GY17991@mit.edu>\r
+User-Agent: Notmuch/0.11+137~g98adc3d (http://notmuchmail.org) Emacs/23.2.1\r
+ (i486-pc-linux-gnu)\r
+Date: Tue, 31 Jan 2012 11:40:00 +0000\r
+Message-ID: <871uqgdrsf.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: f70a79ed6187b09a558b60e6f55ed0b5 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.8\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored -1.8 points.\r
+ Summary of the scoring: \r
+ * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+ * medium trust\r
+ * [138.37.6.40 listed in list.dnswl.org]\r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+ * domain\r
+ * 0.5 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+Cc: notmuch@notmuchmail.org\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: Tue, 31 Jan 2012 11:39:01 -0000\r
+\r
+\r
+Thanks for the review. Almost all of it (for all all the patches) I\r
+agree with and will just fix but I do have a couple of queries.\r
+\r
+On Mon, 30 Jan 2012 23:17:32 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> Quoth Mark Walters on Jan 29 at 6:39 pm:\r
+> > This option turns off the exclusion so all matching messages are\r
+> > returned. We do not need to add this to show as notmuch-show does not\r
+> > (yet) exclude.\r
+> > ---\r
+> > notmuch-count.c | 12 ++++++++----\r
+> > notmuch-search.c | 12 ++++++++----\r
+> > 2 files changed, 16 insertions(+), 8 deletions(-)\r
+> > \r
+> > diff --git a/notmuch-count.c b/notmuch-count.c\r
+> > index 63459fb..c88975e 100644\r
+> > --- a/notmuch-count.c\r
+> > +++ b/notmuch-count.c\r
+> > @@ -37,6 +37,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
+> > int output = OUTPUT_MESSAGES;\r
+> > const char **search_exclude_tags;\r
+> > size_t search_exclude_tags_length;\r
+> > + notmuch_bool_t do_not_exclude = FALSE;\r
+> > unsigned int i;\r
+> > \r
+> > notmuch_opt_desc_t options[] = {\r
+> > @@ -44,6 +45,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
+> > (notmuch_keyword_t []){ { "threads", OUTPUT_THREADS },\r
+> > { "messages", OUTPUT_MESSAGES },\r
+> > { 0, 0 } } },\r
+> > + { NOTMUCH_OPT_BOOLEAN, &do_not_exclude, "do-not-exclude", 'd', 0 },\r
+> \r
+> Maybe just "no-exclude"? "do-not-exclude" seems needlessly verbose.\r
+\r
+The reason I went for verbose do-not-exclude was to try and avoid the\r
+double negative ambiguity: does no-exclude mean do-not-exclude or\r
+do-note-return-excluded-messages. Possibly I am worrying needlessly, and\r
+obviously I am quite happy to change.\r
+\r
+> Also, you have an extra space after the first comma.\r
+\r
+Will fix.\r
+\r
+> \r
+> > { 0, 0, 0, 0, 0 }\r
+> > };\r
+> > \r
+> > @@ -78,10 +80,12 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
+> > return 1;\r
+> > }\r
+> > \r
+> > - search_exclude_tags = notmuch_config_get_search_exclude_tags\r
+> > - (config, &search_exclude_tags_length);\r
+> > - for (i = 0; i < search_exclude_tags_length; i++)\r
+> > - notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
+> > + if (!do_not_exclude) {\r
+> \r
+> You could move search_exclude_tags and search_exclude_tags_length in\r
+> here now that it's a block (but you don't have to).\r
+\r
+Will fix\r
+\r
+> > + search_exclude_tags = notmuch_config_get_search_exclude_tags\r
+> > + (config, &search_exclude_tags_length);\r
+> > + for (i = 0; i < search_exclude_tags_length; i++)\r
+> > + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
+> > + }\r
+> > \r
+> > switch (output) {\r
+> > case OUTPUT_MESSAGES:\r
+> > diff --git a/notmuch-search.c b/notmuch-search.c\r
+> > index d504051..084dd05 100644\r
+> > --- a/notmuch-search.c\r
+> > +++ b/notmuch-search.c\r
+> > @@ -425,6 +425,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+> > int limit = -1; /* unlimited */\r
+> > const char **search_exclude_tags;\r
+> > size_t search_exclude_tags_length;\r
+> > + notmuch_bool_t do_not_exclude = FALSE;\r
+> > unsigned int i;\r
+> > \r
+> > enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }\r
+> > @@ -446,6 +447,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+> > { "files", OUTPUT_FILES },\r
+> > { "tags", OUTPUT_TAGS },\r
+> > { 0, 0 } } },\r
+> > + { NOTMUCH_OPT_BOOLEAN, &do_not_exclude, "do-not-exclude", 'd', 0 },\r
+> \r
+> Same.\r
+\r
+Will fix\r
+\r
+> \r
+> > { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },\r
+> > { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0 },\r
+> > { 0, 0, 0, 0, 0 }\r
+> > @@ -493,10 +495,12 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+> > \r
+> > notmuch_query_set_sort (query, sort);\r
+> > \r
+> > - search_exclude_tags = notmuch_config_get_search_exclude_tags\r
+> > - (config, &search_exclude_tags_length);\r
+> > - for (i = 0; i < search_exclude_tags_length; i++)\r
+> > - notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
+> > + if (!do_not_exclude) {\r
+> > + search_exclude_tags = notmuch_config_get_search_exclude_tags\r
+> > + (config, &search_exclude_tags_length);\r
+> > + for (i = 0; i < search_exclude_tags_length; i++)\r
+> > + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
+> > + }\r
+> > \r
+> > switch (output) {\r
+> > default:\r
+\r
+Thanks\r
+\r
+Mark\r
+\r