From b6cfe7220701a94d6f396ce6bc92448f4b406b89 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 1 Feb 2012 11:18:35 +1900 Subject: [PATCH] Re: [PATCH 1/7] cli: add --do-not-exclude option to count and search. --- 6c/a33338c91be1ec9da11aa814d24c96da9108ce | 120 ++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 6c/a33338c91be1ec9da11aa814d24c96da9108ce diff --git a/6c/a33338c91be1ec9da11aa814d24c96da9108ce b/6c/a33338c91be1ec9da11aa814d24c96da9108ce new file mode 100644 index 000000000..e65049283 --- /dev/null +++ b/6c/a33338c91be1ec9da11aa814d24c96da9108ce @@ -0,0 +1,120 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 5E03541ED91 + for ; Tue, 31 Jan 2012 08:19:32 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 8KbbO9zephL6 for ; + Tue, 31 Jan 2012 08:19:31 -0800 (PST) +Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU + [18.9.25.14]) + by olra.theworths.org (Postfix) with ESMTP id 963E2429E5B + for ; Tue, 31 Jan 2012 08:19:31 -0800 (PST) +X-AuditID: 1209190e-b7f7c6d0000008c3-97-4f28149115a0 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP + id 07.D0.02243.194182F4; Tue, 31 Jan 2012 11:19:29 -0500 (EST) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q0VGJTD7024293; + Tue, 31 Jan 2012 11:19:29 -0500 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0VGJSv9026689 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Tue, 31 Jan 2012 11:19:28 -0500 (EST) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1RsGPj-0004BU-4J; Tue, 31 Jan 2012 11:18:35 -0500 +Date: Tue, 31 Jan 2012 11:18:35 -0500 +From: Austin Clements +To: Mark Walters +Subject: Re: [PATCH 1/7] cli: add --do-not-exclude option to count and search. +Message-ID: <20120131161835.GD10898@mit.edu> +References: <8762fu4aqt.fsf@qmul.ac.uk> + <1327862394-14334-1-git-send-email-markwalters1009@gmail.com> + <20120131041732.GY17991@mit.edu> <871uqgdrsf.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <871uqgdrsf.fsf@qmul.ac.uk> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT150oouFvcOi8tcXquTwW12/OZHZg + 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mp4tu8RW8IWvYt28bWwNjIe5uxg5OSQETCRm + r7vDCmGLSVy4t56ti5GLQ0hgH6PEokUvmCCcDYwSz2bOZYdwTjJJPHt6AyqzhFHibMcaRpB+ + FgFViV1/+8BsNgENiW37l4PZIgI6ErcPLWAHsZkFpCW+/W5mArGFBfwkPj+fwAxi8wLVzD4/ + F8wWEljBKDHpqBhEXFDi5MwnLBC9WhI3/r0E6uUAm7P8HwdImBNo1e2Z/8BaRQVUJKac3MY2 + gVFoFpLuWUi6ZyF0L2BkXsUom5JbpZubmJlTnJqsW5ycmJeXWqRrrJebWaKXmlK6iREU1pyS + fDsYvx5UOsQowMGoxMO7672avxBrYllxZe4hRkkOJiVR3u+CGv5CfEn5KZUZicUZ8UWlOanF + hxglOJiVRHjfrAYq501JrKxKLcqHSUlzsCiJ86ppvfMTEkhPLEnNTk0tSC2CycpwcChJ8JYK + Aw0VLEpNT61Iy8wpQUgzcXCCDOcBGn5TCKiGt7ggMbc4Mx0if4pRUUqcdzdIswBIIqM0D64X + lnZeMYoDvSLMexqkigeYsuC6XwENZgIa/JxBFWRwSSJCSqqB0Zf1VceXmVVL/dx9f3dduvn5 + 359k9kPLz74srPtvL/Gh8VdHtvnWvv/aNX/NpzxhjD/m/XXRn1+KLhtf3hd6F3L1eIq76nL2 + Snebx03/fnWf3iH58OsXTrc58nzT/s3ef6z730/HyrsMwZ81tk70znwdtqJo1oWezLTEIwc3 + G4n12aX/nPyqL1+JpTgj0VCLuag4EQCYta9bFgMAAA== +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 31 Jan 2012 16:19:32 -0000 + +Quoth Mark Walters on Jan 31 at 11:40 am: +> +> Thanks for the review. Almost all of it (for all all the patches) I +> agree with and will just fix but I do have a couple of queries. +> +> On Mon, 30 Jan 2012 23:17:32 -0500, Austin Clements wrote: +> > Quoth Mark Walters on Jan 29 at 6:39 pm: +> > > This option turns off the exclusion so all matching messages are +> > > returned. We do not need to add this to show as notmuch-show does not +> > > (yet) exclude. +> > > --- +> > > notmuch-count.c | 12 ++++++++---- +> > > notmuch-search.c | 12 ++++++++---- +> > > 2 files changed, 16 insertions(+), 8 deletions(-) +> > > +> > > diff --git a/notmuch-count.c b/notmuch-count.c +> > > index 63459fb..c88975e 100644 +> > > --- a/notmuch-count.c +> > > +++ b/notmuch-count.c +> > > @@ -37,6 +37,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) +> > > int output = OUTPUT_MESSAGES; +> > > const char **search_exclude_tags; +> > > size_t search_exclude_tags_length; +> > > + notmuch_bool_t do_not_exclude = FALSE; +> > > unsigned int i; +> > > +> > > notmuch_opt_desc_t options[] = { +> > > @@ -44,6 +45,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) +> > > (notmuch_keyword_t []){ { "threads", OUTPUT_THREADS }, +> > > { "messages", OUTPUT_MESSAGES }, +> > > { 0, 0 } } }, +> > > + { NOTMUCH_OPT_BOOLEAN, &do_not_exclude, "do-not-exclude", 'd', 0 }, +> > +> > Maybe just "no-exclude"? "do-not-exclude" seems needlessly verbose. +> +> The reason I went for verbose do-not-exclude was to try and avoid the +> double negative ambiguity: does no-exclude mean do-not-exclude or +> do-note-return-excluded-messages. Possibly I am worrying needlessly, and +> obviously I am quite happy to change. + +Oh. Hmm. --no-exclusions? --unexcluded? --all? +--include-excludes? Maybe --do-not-exclude is best. -- 2.26.2