[PATCH 1/7] cli: add --do-not-exclude option to count and search.

Austin Clements amdragon at MIT.EDU
Tue Jan 31 08:18:35 PST 2012


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 <amdragon at MIT.EDU> 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.


More information about the notmuch mailing list