unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* v2 Merged Config
@ 2020-12-25  0:42 David Bremner
  2020-12-25  0:42 ` [PATCH 01/24] lib: add _notmuch_string_map_set David Bremner
                   ` (23 more replies)
  0 siblings, 24 replies; 26+ messages in thread
From: David Bremner @ 2020-12-25  0:42 UTC (permalink / raw)
  To: notmuch

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).


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2020-12-26 13:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-25  0:42 v2 Merged Config David Bremner
2020-12-25  0:42 ` [PATCH 01/24] lib: add _notmuch_string_map_set David Bremner
2020-12-25  0:42 ` [PATCH 02/24] lib: cache configuration information from database David Bremner
2020-12-25  0:42 ` [PATCH 03/24] lib: add stub for notmuch_database_open_with_config David Bremner
2020-12-26 13:13   ` David Bremner
2020-12-25  0:42 ` [PATCH 04/24] lib/open: add support for config profiles and default locations David Bremner
2020-12-25  0:42 ` [PATCH 05/24] CLI: generalize notmuch_config_mode_t David Bremner
2020-12-25  0:42 ` [PATCH 06/24] lib/config: add notmuch_config_key_{get,set} David Bremner
2020-12-25  0:42 ` [PATCH 07/24] lib/open: load default values for known configuration keys David Bremner
2020-12-25  0:42 ` [PATCH 08/24] CLI: add (unused) database argument to subcommands David Bremner
2020-12-25  0:42 ` [PATCH 09/24] util: add strsplit_len: simplified strtok with delimiter escaping David Bremner
2020-12-25  0:42 ` [PATCH 10/24] lib/config: add config values iterator David Bremner
2020-12-25  0:42 ` [PATCH 11/24] CLI/count: switch to new configuration framework David Bremner
2020-12-25  0:42 ` [PATCH 12/24] cli/dump: convert to new config framework David Bremner
2020-12-25  0:42 ` [PATCH 13/24] lib: add notmuch_config_get_bool David Bremner
2020-12-25  0:42 ` [PATCH 14/24] CLI/restore: convert to new config framework David Bremner
2020-12-25  0:42 ` [PATCH 15/24] CLI/insert: " David Bremner
2020-12-25  0:42 ` [PATCH 16/24] cli/reindex: convert " David Bremner
2020-12-25  0:42 ` [PATCH 17/24] CLI/reply: convert to " David Bremner
2020-12-25  0:42 ` [PATCH 18/24] CLI/{search,address}: convert to new configuration framework David Bremner
2020-12-25  0:42 ` [PATCH 19/24] cli/config: add accessor for config file name David Bremner
2020-12-25  0:42 ` [PATCH 20/24] CLI/show: mostly switch show to new config framework David Bremner
2020-12-25  0:42 ` [PATCH 21/24] cli/tag: convert " David Bremner
2020-12-25  0:42 ` [PATCH 22/24] lib/config: add _notmuch_config_cache David Bremner
2020-12-25  0:42 ` [PATCH 23/24] lib: split notmuch_database_compact David Bremner
2020-12-25  0:42 ` [PATCH 24/24] cli/compact: convert to new configuration framework David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).