Re: [PATCH] cli: add support for only printing the addresses in notmuch address

Subject: Re: [PATCH] cli: add support for only printing the addresses in notmuch address

Date: Wed, 20 Dec 2017 13:15:06 +0200

To: Jameson Graef Rollins, Daniel Kahn Gillmor,


From: Jani Nikula

On Tue, 19 Dec 2017, Jameson Graef Rollins <> wrote:
> On Wed, Dec 20 2017, Jani Nikula <> wrote:
>> ~$ notmuch address --output=sender --output=recipients --output=address --output=count
>> 1
>> 1
>> 1
>> 1
>> I prefer this to separate options.
> Really?  If each is just a switch then why not:
> ~$ notmuch address --sender --recipients --address --count
> ?  It's just shorter, right?
> Also, this behavior is quite different than for search, in which only
> the last --output applies.
>> notmuch search uses separate --entire-thread, --body, and --include-html
>> options, and I think those are getting messy.

That was supposed to be notmuch show, not search.

> The seem less messy than a "--output=" prefixed version of the same.

Matter of taste. I like the self-documenting aspect of *what* these
options control. --output=body is obvious, --body is less
so. --include-html includes html somewhere, I think --output=html would
be better.

In the spirit of worse is better, I'll note that using --output= stores
all the possible values in a single bit mask, and it's easy to define
the defaults for *all* possible outputs in one variable, and it's easy
to check *all* possible combinations with bit masks. Not so with
independent parameters. Again, matter of taste how much you appreciate
implementation simplicity. With notmuch show, I think that guideline
would have made the interface better too. YMMV.

As to notmuch address --output=address, it fulfills all the feature
needs that popped up in this thread. If there's a strong desired to
change the interface, we'll need patches as this one's already merged.

notmuch mailing list