search summary and exclusions
Mark Walters
markwalters1009 at gmail.com
Mon May 28 11:54:31 PDT 2012
Hi
On Mon, 28 May 2012, Peter Wang <novalazy at gmail.com> wrote:
> Hi,
>
> Exclusions don't work the way I expected with the search command and
> --output=summary. I would like messages with excluded tags to be
> treated as if they don't exist at all, but currently:
>
> * excluded messages are counted towards the "total"
> * excluded tags are included in the "tags" set
>
> Are these deliberate? Especially the second point seems to conflict
> with search --output=tags, which doesn't show excluded tags.
The general idea is that commands that deciding whether something
matches the search checks the excludes but constructing a thread does
not. The difference in tags when outputting tags and summary is that the
former outputs tags of *messages* matching the query (so respects the
excludes) whereas summary outputs the tags of all messages in threads
matching the query (so does not respect the excludes) but see below for
more precise explanations.
notmuch search --output=tags <search>
The tags from messages which match the search and are not excluded are
returned.
notmuch search --output=threads <search>
returns all threads containing a message which matches the search and is
not excluded
notmuch search --output=summary <search>
returns the summary output of all these threads. The summary output
includes all tags of all messages (whether excluded or not) of the
thread and the count is the number of messages (including excluded
messages) of the thread.
This seems consistent with
notmuch show --entire-thread <search>
which returns all messages (whether excluded or not) of all these
threads.
Best wishes
Mark
More information about the notmuch
mailing list