Re: v5 merged config

2021-02-06 Thread David Bremner
David Bremner writes: > The main difference since Tomi's review is that I made several more > tests for configuration path searching in T035-read-config.sh, and > moved some of the existing ones there. I have applied this series (1-39, with the one updated patch) to master. That's a fairly large

[PATCH 2/4] lib: save path of xapian database in notmuch struct.

2021-02-06 Thread David Bremner
This will allow re-opening in a different mode (read/write vs. read-only) with current Xapian API. --- lib/database-private.h | 4 lib/open.cc| 19 ++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/database-private.h b/lib/database-private.h

[PATCH 3/4] lib: support reopening databases for write access.

2021-02-06 Thread David Bremner
In the future xapian will apparently support this more conveniently for the cases other than READ_ONLY => READ_ONLY --- lib/database.cc | 23 lib/open.cc | 40 ++ test/T595-reopen.sh | 125 3 files changed, 165 inserti

[PATCH 1/4] lib: publish API for notmuch_database_reopen

2021-02-06 Thread David Bremner
Include the (currently unused) mode argument which will specify which mode to re-open the database in. Functionality and docs to be finalized in a followup commit. --- lib/database.cc | 3 ++- lib/message.cc| 3 ++- lib/notmuch-private.h | 3 --- lib/notmuch.h | 7 +++ 4

[PATCH 4/4] CLI/show: complete conversion to new configuration framework.

2021-02-06 Thread David Bremner
In order to open the database in main() for this command, we may need to re-open it in the (possibly less common) case where crypto options require it. --- notmuch-show.c | 26 +++--- notmuch.c| 2 +- test/T035-read-config.sh | 2 -- 3 files changed,

Complete conversion of notmuch-show to new config framework

2021-02-06 Thread David Bremner
The series at id:20210205132654.3258292-1-da...@tethera.net only partially converted notmuch-show to the new merged configuration style. This meant in particular that finding configuration files via XDG conventions did not work for notmuch-show. As a side effect, publish notmuch_database_reopen as

[PATCH] CLI/show: mostly switch show to new config framework

2021-02-06 Thread David Bremner
This will need some cleanup when the transition completes, and we stop passing notmuch_config_t structs to the subcommands. Unlike the general case, we open the database in the subcommand, since we don't know whether it should be opened read/write until we parse the command line arguments. Add a