notmuch_messages_t *messages;
notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS;
+ threads = notmuch_query_search_threads (query);
+ if (! threads)
+ return 1;
+
sp->begin_list (sp);
- for (threads = notmuch_query_search_threads (query);
+ for ( ;
notmuch_threads_valid (threads);
notmuch_threads_move_to_next (threads))
{
.output_body = TRUE,
.crypto = {
.verify = FALSE,
- .decrypt = FALSE
+ .decrypt = FALSE,
+ .gpgpath = NULL
},
.include_html = FALSE
};
{ NOTMUCH_OPT_BOOLEAN, ¶ms.crypto.verify, "verify", 'v', 0 },
{ NOTMUCH_OPT_BOOLEAN, ¶ms.output_body, "body", 'b', 0 },
{ NOTMUCH_OPT_BOOLEAN, ¶ms.include_html, "include-html", 0, 0 },
+ { NOTMUCH_OPT_INHERIT, (void *) ¬much_shared_options, NULL, 0, 0 },
{ 0, 0, 0, 0, 0 }
};
if (opt_index < 0)
return EXIT_FAILURE;
+ notmuch_process_shared_options (argv[0]);
+
/* decryption implies verification */
if (params.crypto.decrypt)
params.crypto.verify = TRUE;
return EXIT_FAILURE;
}
+ params.crypto.gpgpath = notmuch_config_get_crypto_gpg_path (config);
+
if (notmuch_database_open (notmuch_config_get_database_path (config),
NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much))
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");