diff options
| author | David Bremner <david@tethera.net> | 2021-08-24 08:17:43 -0700 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-09-04 17:07:19 -0700 |
| commit | 2944d5913319056dfec5c23065932fd1c87a96f6 (patch) | |
| tree | b4f7711a7ee1cbb46f54dd2a4a711ebff2bb5472 /notmuch-count.c | |
| parent | a2e7af5b6986bca5a2bb2752f892cb86a9767b3c (diff) | |
CLI/{count, dump, reindex, reply, show}: enable sexp queries
The change in each case is to call notmuch_query_create_with_syntax,
relying on the already inherited shared options. As a bonus we get
improved error handling from the new query creation API.
The remaining subcommand is 'tag', which is a bit trickier.
Diffstat (limited to 'notmuch-count.c')
| -rw-r--r-- | notmuch-count.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/notmuch-count.c b/notmuch-count.c index e8c545e3..0d9046a8 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -74,10 +74,12 @@ print_count (notmuch_database_t *notmuch, const char *query_str, int ret = 0; notmuch_status_t status; - query = notmuch_query_create (notmuch, query_str); - if (query == NULL) { - fprintf (stderr, "Out of memory\n"); - return -1; + status = notmuch_query_create_with_syntax (notmuch, query_str, + shared_option_query_syntax (), + &query); + if (print_status_database ("notmuch count", notmuch, status)) { + ret = -1; + goto DONE; } for (notmuch_config_values_start (exclude_tags); |
