X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=2848c9c39372fcbad778231c625632119b8e4faa;hp=c8f1a40f2e2803bfa93db1f5eb58132ddbd8b230;hb=b5eaa8ee83b7e6e54ab14cb5c13d6bc5721f522a;hpb=3df2281746d57abbb45790ecb432ef40533c30bc diff --git a/notmuch-show.c b/notmuch-show.c index c8f1a40f..2848c9c3 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1287,7 +1287,7 @@ notmuch_show_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]); /* explicit decryption implies verification */ if (params.crypto.decrypt == NOTMUCH_DECRYPT_NOSTASH || @@ -1353,8 +1353,6 @@ notmuch_show_command (notmuch_database_t *notmuch, int argc, char *argv[]) } } - notmuch_exit_if_unmatched_db_uuid (notmuch); - query_string = query_string_from_args (notmuch, argc - opt_index, argv + opt_index); if (query_string == NULL) { fprintf (stderr, "Out of memory\n"); @@ -1366,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);