diff options
| author | David Bremner <david@tethera.net> | 2015-09-06 10:15:47 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-09-23 08:03:34 -0300 |
| commit | 6cdd34a4c762c954426f586d514a3e041c1db3b0 (patch) | |
| tree | 0796ac4592aeeb3f83ed63d7e4b3f282291a4f7e /notmuch-tag.c | |
| parent | dca72205ab550a6adb22a763a3f86083907b1eba (diff) | |
cli: convert remainder of CLI to n_q_search_{messages,threads}_st
I think it would be no real problem to cut and paste the gdb based
error message test from count to the other clients modified here, but
I'm not currently convinced it's worth the trouble since the code path
being tested is almost the the same, and the tests are relatively
heavyweight.
Diffstat (limited to 'notmuch-tag.c')
| -rw-r--r-- | notmuch-tag.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/notmuch-tag.c b/notmuch-tag.c index 7ae98f6c..c020cb6f 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -97,6 +97,8 @@ tag_query (void *ctx, notmuch_database_t *notmuch, const char *query_string, notmuch_query_t *query; notmuch_messages_t *messages; notmuch_message_t *message; + notmuch_status_t status; + int ret = NOTMUCH_STATUS_SUCCESS; if (! (flags & TAG_FLAG_REMOVE_ALL)) { @@ -119,7 +121,11 @@ tag_query (void *ctx, notmuch_database_t *notmuch, const char *query_string, /* tagging is not interested in any special sort order */ notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED); - for (messages = notmuch_query_search_messages (query); + status = notmuch_query_search_messages_st (query, &messages); + if (print_status_query ("notmuch tag", query, status)) + return status; + + for (; notmuch_messages_valid (messages) && ! interrupted; notmuch_messages_move_to_next (messages)) { message = notmuch_messages_get (messages); |
