X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-reply.c;h=9fca22db818d05f098703ef8493b9b484f3e0e4a;hp=ebb621e08670e6e799416b5ddf74aa932e40144a;hb=cc180507b03d9826c92d48ee91dbd9bb5f15cd56;hpb=ddbf3ffe9bfafa39f2142a7ff9ead202b4b88433 diff --git a/notmuch-reply.c b/notmuch-reply.c index ebb621e0..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 = @@ -746,7 +747,7 @@ notmuch_reply_command (notmuch_database_t *notmuch, int argc, char *argv[]) if (opt_index < 0) return EXIT_FAILURE; - notmuch_process_shared_options (argv[0]); + notmuch_process_shared_options (notmuch, argv[0]); notmuch_exit_if_unsupported_format (); @@ -761,13 +762,11 @@ notmuch_reply_command (notmuch_database_t *notmuch, int argc, char *argv[]) return EXIT_FAILURE; } - notmuch_exit_if_unmatched_db_uuid (notmuch); - - 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;