aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2012-03-01 22:30:43 +0000
committerGravatar David Bremner <bremner@debian.org>2012-03-02 08:37:32 -0400
commit7a1beb9e7c7fdf8971a60d810ae24e58c2d09673 (patch)
tree1870498180b61ce2bc26142e4d264f8db0ee7219 /notmuch-show.c
parent99c318cae464159ca5b4ec86643ccf3c8b98c1b3 (diff)
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
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index 8c0b925e..05d51b27 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -1030,6 +1030,7 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
fprintf (stderr, "Error: specifying parts is incompatible with mbox output format.\n");
return 1;
}
+
format = &format_mbox;
break;
case NOTMUCH_FORMAT_RAW:
@@ -1087,6 +1088,11 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
return 1;
}
+ /* if format=mbox then we can not output excluded messages as
+ * there is no way to make the exclude flag available */
+ if (format_sel == NOTMUCH_FORMAT_MBOX)
+ notmuch_query_set_omit_excluded_messages (query, TRUE);
+
/* If a single message is requested we do not use search_excludes. */
if (params.part >= 0)
ret = do_show_single (ctx, query, format, &params);