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-show.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-show.c')
-rw-r--r-- | notmuch-show.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/notmuch-show.c b/notmuch-show.c index 667fbee8..2848c9c3 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1364,11 +1364,11 @@ notmuch_show_command (notmuch_database_t *notmuch, int argc, char *argv[]) return EXIT_FAILURE; } - query = notmuch_query_create (notmuch, query_string); - if (query == NULL) { - fprintf (stderr, "Out of memory\n"); + status = notmuch_query_create_with_syntax (notmuch, query_string, + shared_option_query_syntax (), + &query); + if (print_status_database ("notmuch show", notmuch, status)) return EXIT_FAILURE; - } notmuch_query_set_sort (query, sort); |