unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: Peter Wang <novalazy@gmail.com>, notmuch@notmuchmail.org
Subject: Re: search summary and exclusions
Date: Mon, 28 May 2012 19:54:31 +0100	[thread overview]
Message-ID: <871um4nnko.fsf@qmul.ac.uk> (raw)
In-Reply-To: <20120529000012.GF2331@hili.localdomain>


Hi

On Mon, 28 May 2012, Peter Wang <novalazy@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

      parent reply	other threads:[~2012-05-28 18:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 14:00 search summary and exclusions Peter Wang
2012-05-28 17:03 ` Jameson Graef Rollins
2012-05-29  4:01   ` Peter Wang
2012-05-29  8:37     ` Mark Walters
2012-05-29 15:00     ` Jameson Graef Rollins
2012-05-30  3:07       ` Peter Wang
2012-05-30  3:58         ` Jameson Graef Rollins
2012-05-30  7:49         ` Mark Walters
2012-06-17  7:03           ` Peter Wang
2012-06-17  7:22             ` Mark Walters
2012-06-17  7:27               ` [WIP 1/2] lib: add --exclude=all option Mark Walters
2012-06-17  7:27                 ` [WIP 2/2] cli: add --exclude=all option to notmuch-search.c Mark Walters
2012-05-28 18:54 ` Mark Walters [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871um4nnko.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    --cc=novalazy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).