From 7a1beb9e7c7fdf8971a60d810ae24e58c2d09673 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Thu, 1 Mar 2012 22:30:43 +0000 Subject: cli: omit excluded messages in results where appropriate. In all cases of notmuch count/search/show where the results returned cannot reflect the exclude flag return just the matched not-excluded results. If the caller wishes to have all the matched results (i.e., including the excluded ones) they should call with the --no-exclude option. The relevant cases are count: both threads and messages search: all cases except the summary view show: mbox format --- notmuch-count.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'notmuch-count.c') diff --git a/notmuch-count.c b/notmuch-count.c index 53645070..46b76ae1 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -88,6 +88,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) notmuch_query_add_tag_exclude (query, search_exclude_tags[i]); } + notmuch_query_set_omit_excluded_messages (query, TRUE); + switch (output) { case OUTPUT_MESSAGES: printf ("%u\n", notmuch_query_count_messages (query)); -- cgit v1.2.3