notmuch_messages_move_to_next (messages)) {
message = notmuch_messages_get (messages);
- if (mime_node_open (notmuch, message, ¶ms->crypto, &node))
+ if (mime_node_open (notmuch, message, -1, ¶ms->crypto, &node))
return 1;
reply = create_reply_message (notmuch, message,
/* Start the original */
sp->map_key (sp, "original");
- format_part_sprinter (notmuch, sp, node, true, false);
+ format_part_sprinter (notmuch, sp, node, -1, true, false);
/* End */
sp->end (sp);
};
int format = FORMAT_DEFAULT;
int reply_all = true;
+ notmuch_status_t status;
notmuch_opt_desc_t options[] = {
{ .opt_keyword = &format, .name = "format", .keywords =
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 ();
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;