v2 Merged Config

Subject: v2 Merged Config

Date: Thu, 24 Dec 2020 20:42:04 -0400

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


This is a revised version of the series at id:20200808141653.1124111-1-david@tethera.net

It now converts everything but notmuch-setup and notmuch-config to the
new framework, which means that the distinction between configuration
stored in the database and that in an auxilary config file is mostly
gone from a user point of view.

Compared to the previous version, this one modifies
notmuch_database_{get,set}_config to use the merged configuration
cache. There is a tradeoff here between expressive power and
proliferation of APIs: now _have_ to use the merged configuration
view, and there's no easy way for a user to to distinguish what is in
the database.  Most new code is expected to use
notmuch_config_{get,set}, which takes enum keys.

I went ahead and converted the function signature of the subcommands
to take both a notmuch_config_t * and a notmuch_database_t *, one of
which is always NULL. Polymorphism C style, I guess. This mostly works
well, except for notmuch-show, where we can't determine early enough
whether to open the database for write access.

The first 10 patches are most of the groundwork. The remaining patches
are mostly converting subcommands to the new configuration framework,
with two or three more groundwork patches.

I still haven't dealt with the searching for database features
documented, but I think the existing series adds useful functionality,
and in a pinch we could release with only these changes (with
appropriate adjustements to the n_d_open_with_config documentation).


_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: