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;
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;
ctx->offset = 0;
}
- status = notmuch_query_search_messages_st (ctx->query, &messages);
+ status = notmuch_query_search_messages (ctx->query, &messages);
if (print_status_query ("notmuch search", ctx->query, status))
return 1;
tags = notmuch_database_get_all_tags (notmuch);
} else {
notmuch_status_t status;
- status = notmuch_query_search_messages_st (query, &messages);
+ status = notmuch_query_search_messages (query, &messages);
if (print_status_query ("notmuch search", query, status))
return 1;
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);
}