From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SHH6APazLl9RAgAA0tVLHw (envelope-from ) for ; Sat, 08 Aug 2020 14:17:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0I1kOPWzLl8QJwAAB5/wlQ (envelope-from ) for ; Sat, 08 Aug 2020 14:17:25 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B7B5E94028F for ; Sat, 8 Aug 2020 14:17:24 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A924329AB9; Sat, 8 Aug 2020 10:17:10 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 4991F2711D for ; Sat, 8 Aug 2020 10:17:07 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id B15345FA66; Sat, 8 Aug 2020 10:17:05 -0400 (EDT) Received: (nullmailer pid 1124254 invoked by uid 1000); Sat, 08 Aug 2020 14:17:04 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Initial implementation of merged config Date: Sat, 8 Aug 2020 11:16:34 -0300 Message-Id: <20200808141653.1124111-1-david@tethera.net> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Message-ID-Hash: UQIIDBC3VZRQ7TWNMTCLN2CSIDAJ2BO2 X-Message-ID-Hash: UQIIDBC3VZRQ7TWNMTCLN2CSIDAJ2BO2 X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 0.03 X-TUID: BJHaASDZlrXD 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