unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Initial implementation of merged config
@ 2020-08-08 14:16 David Bremner
  2020-08-08 14:16 ` [PATCH 01/19] test: use keys with group 'test' in T590-libconfig David Bremner
                   ` (18 more replies)
  0 siblings, 19 replies; 22+ messages in thread
From: David Bremner @ 2020-08-08 14:16 UTC (permalink / raw)
  To: notmuch

This follow-up to

     id:20200703134338.3311659-1-david@tethera.net

is a first draft of a rewrite of the notmuch configuration system. It
aims to remove several annoyances including:

- not being able to have certain configuration items in a plain text config file
- bindings support for configuration being somewhat half-baked
- not supporting XDG_foo

Not all of that promise is realized (or at least tested) in this
initial draft. On the other hand, hopefully a bunch of new tests in
T590-libconfig.sh make the intended API more clear. 

This patch implements the logic for finding config files:

     [PATCH 12/19] WIP: adding fallbacks for NULL config_path

Something similar needs to be done for finding database files.

In the last two commands you can see roughly how much
work is needed to convert to the style of config handling

     [PATCH 18/19] WIP converting notmuch search to new style config
     [PATCH 19/19] WIP: switch notmuch-show to new config framework

The is some awkardness due to converting one subcommand at a time: the
subcommand table uses a fixed function signature and we can't change
that until all the subcommands are updated. So we end up re-opening the config file in the modified subcommands.

Some design questions people might like to give feedback on

- the switch in notmuch-search.c to using the string
  "search.exclude_tags" directly to fetch tags.  I'm hoping that a
  reduction in boilerplate compensates for a decrease in "type safety"
  here, compared to the existing
  notmuch_config_get_search_exclude_tags. I'm hoping substantial
  portions of notmuch-config.c can disappear during this rewrite.

- the use of simple keys for the new merged notmuch_config_{get,set}_*
  in lib/config.cc, rather than the section, pair file suggested by the glib key_file format. 


My rough plan is to do a release 0.31 with all the cleanup we have
accumulated since 0.30, and target these changes for 0.32

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

end of thread, other threads:[~2020-08-09 10:18 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-08 14:16 Initial implementation of merged config David Bremner
2020-08-08 14:16 ` [PATCH 01/19] test: use keys with group 'test' in T590-libconfig David Bremner
2020-08-08 14:16 ` [PATCH 02/19] lib: add stub for notmuch_database_open_with_config David Bremner
2020-08-09  7:19   ` Reto
2020-08-09 10:18     ` David Bremner
2020-08-08 14:16 ` [PATCH 03/19] lib: cache configuration information from database David Bremner
2020-08-08 14:16 ` [PATCH 04/19] WIP: add notmuch_config_get David Bremner
2020-08-08 14:16 ` [PATCH 05/19] WIP: add notmuch_config_set David Bremner
2020-08-08 14:16 ` [PATCH 06/19] WIP: initial retrieval of database path from config file David Bremner
2020-08-08 14:16 ` [PATCH 07/19] test/libconfig; use n_database_open_with_config David Bremner
2020-08-08 14:16 ` [PATCH 08/19] WIP: add _notmuch_config_load_from_file David Bremner
2020-08-08 14:16 ` [PATCH 09/19] lib: factor out feature name related code David Bremner
2020-08-08 14:16 ` [PATCH 10/19] lib: factor out prefix related code to its own file David Bremner
2020-08-08 14:16 ` [PATCH 11/19] lib: factor out notmuch_database_open* related code to " David Bremner
2020-08-08 14:16 ` [PATCH 12/19] WIP: adding fallbacks for NULL config_path David Bremner
2020-08-08 14:16 ` [PATCH 13/19] lib/config: delay setting talloc destructor David Bremner
2020-08-08 14:16 ` [PATCH 14/19] WIP: add strsplit_len David Bremner
2020-08-08 14:16 ` [PATCH 15/19] WIP: add config values iterator David Bremner
2020-08-08 14:16 ` [PATCH 16/19] test: add regression test for searching with alternate config David Bremner
2020-08-08 14:16 ` [PATCH 17/19] cli/config: add accessor for config file name David Bremner
2020-08-08 14:16 ` [PATCH 18/19] WIP converting notmuch search to new style config David Bremner
2020-08-08 14:16 ` [PATCH 19/19] WIP: switch notmuch-show to new config 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).