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-reply.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-reply.c')
| -rw-r--r-- | notmuch-reply.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/notmuch-reply.c b/notmuch-reply.c index 13e38c20..9fca22db 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -719,6 +719,7 @@ notmuch_reply_command (notmuch_database_t *notmuch, int argc, char *argv[]) }; int format = FORMAT_DEFAULT; int reply_all = true; + notmuch_status_t status; notmuch_opt_desc_t options[] = { { .opt_keyword = &format, .name = "format", .keywords = @@ -761,11 +762,11 @@ notmuch_reply_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 reply", notmuch, status)) return EXIT_FAILURE; - } if (do_reply (notmuch, query, ¶ms, format, reply_all) != 0) return EXIT_FAILURE; |
