[PATCH] Have notmuch count default to showing the total.

Sebastian Spaeth Sebastian at SSpaeth.de
Fri Apr 9 06:01:35 PDT 2010


On 2010-04-08, Mike Kelly wrote:
> If no parameters are given to notmuch-count, or just '' or '*' are
> given, return the total number of messages in the database.

I know that cworth was concerned about this syntax on IRC as that would
mean that "notmuch show" would have to spew out all your emails in order
to remain consistent with the search term (he rather wanted to output a
help text if no search term was given).

But let me express support (It's notmuch worth, I know (haha)) for this
patch. I think it makes lots of sense:

1) I often want to know how many mails are in my db. "notmuch count" or
"notmuch count *" is the intuitive syntax I would use for that. Right
now there is no way as far as I can see.

2) Search terms filter out things. The empty search term stands
therefore for all my mails. It is consistent to have the search term ''
represent all my mail.

3) I don't expect a help text for "notmuch count" just as I don't expect
a help text for "notmuch log", we are very explicit about "notmuch help"
and "notmuch help count" in many parts of our documentation.

I'm using this and find it very handy.

Sebastian


More information about the notmuch mailing list