Re: [PATCH 1/7] cli: add --do-not-exclude option to count and search.
authorAustin Clements <amdragon@MIT.EDU>
Tue, 31 Jan 2012 16:18:35 +0000 (11:18 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:50 +0000 (09:43 -0800)
6c/a33338c91be1ec9da11aa814d24c96da9108ce [new file with mode: 0644]

diff --git a/6c/a33338c91be1ec9da11aa814d24c96da9108ce b/6c/a33338c91be1ec9da11aa814d24c96da9108ce
new file mode 100644 (file)
index 0000000..e650492
--- /dev/null
@@ -0,0 +1,120 @@
+Return-Path: <amdragon@mit.edu>\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 5E03541ED91\r
+       for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 08:19:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 8KbbO9zephL6 for <notmuch@notmuchmail.org>;\r
+       Tue, 31 Jan 2012 08:19:31 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id 963E2429E5B\r
+       for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 08:19:31 -0800 (PST)\r
+X-AuditID: 1209190e-b7f7c6d0000008c3-97-4f28149115a0\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 07.D0.02243.194182F4; Tue, 31 Jan 2012 11:19:29 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q0VGJTD7024293; \r
+       Tue, 31 Jan 2012 11:19:29 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0VGJSv9026689\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Tue, 31 Jan 2012 11:19:28 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RsGPj-0004BU-4J; Tue, 31 Jan 2012 11:18:35 -0500\r
+Date: Tue, 31 Jan 2012 11:18:35 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH 1/7] cli: add --do-not-exclude option to count and search.\r
+Message-ID: <20120131161835.GD10898@mit.edu>\r
+References: <8762fu4aqt.fsf@qmul.ac.uk>\r
+       <1327862394-14334-1-git-send-email-markwalters1009@gmail.com>\r
+       <20120131041732.GY17991@mit.edu> <871uqgdrsf.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <871uqgdrsf.fsf@qmul.ac.uk>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT150oouFvcOi8tcXquTwW12/OZHZg\r
+       8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mp4tu8RW8IWvYt28bWwNjIe5uxg5OSQETCRm\r
+       r7vDCmGLSVy4t56ti5GLQ0hgH6PEokUvmCCcDYwSz2bOZYdwTjJJPHt6AyqzhFHibMcaRpB+\r
+       FgFViV1/+8BsNgENiW37l4PZIgI6ErcPLWAHsZkFpCW+/W5mArGFBfwkPj+fwAxi8wLVzD4/\r
+       F8wWEljBKDHpqBhEXFDi5MwnLBC9WhI3/r0E6uUAm7P8HwdImBNo1e2Z/8BaRQVUJKac3MY2\r
+       gVFoFpLuWUi6ZyF0L2BkXsUom5JbpZubmJlTnJqsW5ycmJeXWqRrrJebWaKXmlK6iREU1pyS\r
+       fDsYvx5UOsQowMGoxMO7672avxBrYllxZe4hRkkOJiVR3u+CGv5CfEn5KZUZicUZ8UWlOanF\r
+       hxglOJiVRHjfrAYq501JrKxKLcqHSUlzsCiJ86ppvfMTEkhPLEnNTk0tSC2CycpwcChJ8JYK\r
+       Aw0VLEpNT61Iy8wpQUgzcXCCDOcBGn5TCKiGt7ggMbc4Mx0if4pRUUqcdzdIswBIIqM0D64X\r
+       lnZeMYoDvSLMexqkigeYsuC6XwENZgIa/JxBFWRwSSJCSqqB0Zf1VceXmVVL/dx9f3dduvn5\r
+       359k9kPLz74srPtvL/Gh8VdHtvnWvv/aNX/NpzxhjD/m/XXRn1+KLhtf3hd6F3L1eIq76nL2\r
+       Snebx03/fnWf3iH58OsXTrc58nzT/s3ef6z730/HyrsMwZ81tk70znwdtqJo1oWezLTEIwc3\r
+       G4n12aX/nPyqL1+JpTgj0VCLuag4EQCYta9bFgMAAA==\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 16:19:32 -0000\r
+\r
+Quoth Mark Walters on Jan 31 at 11:40 am:\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
+Oh.  Hmm.  --no-exclusions?  --unexcluded?  --all?\r
+--include-excludes?  Maybe --do-not-exclude is best.\r