X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-search.c;h=019e14eea846d6a68fe36a0210318bcd35d84063;hp=1c4d52053a73cd42092b6e7a1470ab71aca00e69;hb=3840b6b4953020b1c739f1892774cfe2ea329bed;hpb=86cbd215eb67d7b996c977352a50e70c101cb641 diff --git a/notmuch-search.c b/notmuch-search.c index 1c4d5205..019e14ee 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -123,7 +123,7 @@ do_search_threads (search_context_t *ctx) if (ctx->offset < 0) { unsigned count; notmuch_status_t status; - status = notmuch_query_count_threads_st (ctx->query, &count); + status = notmuch_query_count_threads (ctx->query, &count); if (print_status_query ("notmuch search", ctx->query, status)) return 1; @@ -529,7 +529,7 @@ do_search_messages (search_context_t *ctx) if (ctx->offset < 0) { unsigned count; notmuch_status_t status; - status = notmuch_query_count_messages_st (ctx->query, &count); + status = notmuch_query_count_messages (ctx->query, &count); if (print_status_query ("notmuch search", ctx->query, status)) return 1; @@ -735,11 +735,19 @@ _notmuch_search_prepare (search_context_t *ctx, notmuch_config_t *config, int ar if (ctx->exclude != NOTMUCH_EXCLUDE_FALSE) { const char **search_exclude_tags; size_t search_exclude_tags_length; + notmuch_status_t status; search_exclude_tags = notmuch_config_get_search_exclude_tags (config, &search_exclude_tags_length); - for (i = 0; i < search_exclude_tags_length; i++) - notmuch_query_add_tag_exclude (ctx->query, search_exclude_tags[i]); + + for (i = 0; i < search_exclude_tags_length; i++) { + status = notmuch_query_add_tag_exclude (ctx->query, search_exclude_tags[i]); + if (status && status != NOTMUCH_STATUS_IGNORED) { + print_status_query ("notmuch search", ctx->query, status); + return EXIT_FAILURE; + } + } + notmuch_query_set_omit_excluded (ctx->query, ctx->exclude); }