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-dump.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-dump.c')
-rw-r--r-- | notmuch-dump.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/notmuch-dump.c b/notmuch-dump.c index 5c8213be..cb82d61f 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -232,11 +232,12 @@ database_dump_file (notmuch_database_t *notmuch, gzFile output, if (! query_str) query_str = ""; - query = notmuch_query_create (notmuch, query_str); - if (query == NULL) { - fprintf (stderr, "Out of memory\n"); + status = notmuch_query_create_with_syntax (notmuch, query_str, + shared_option_query_syntax (), + &query); + if (print_status_database ("notmuch dump", notmuch, status)) return EXIT_FAILURE; - } + /* Don't ask xapian to sort by Message-ID. Xapian optimizes returning the * first results quickly at the expense of total time. */ |