From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uC6nOqc8MWAYYwAA0tVLHw (envelope-from ) for ; Sat, 20 Feb 2021 16:45:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YKV9Nqc8MWAiVwAA1q6Kng (envelope-from ) for ; Sat, 20 Feb 2021 16:45:27 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C6D7E2791F for ; Sat, 20 Feb 2021 17:45:26 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 8853826AD3; Sat, 20 Feb 2021 11:45:03 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 8B90026ACB for ; Sat, 20 Feb 2021 11:44:58 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id B542560666; Sat, 20 Feb 2021 11:44:56 -0500 (EST) Received: (nullmailer pid 3956158 invoked by uid 1000); Sat, 20 Feb 2021 16:44:54 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: RFC convert remaining CLI to new configuration Date: Sat, 20 Feb 2021 12:44:30 -0400 Message-Id: <20210220164448.3956011-1-david@tethera.net> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Message-ID-Hash: EEOCUIM6MOFW57KD5IQZLXPRG7AQLLYN X-Message-ID-Hash: EEOCUIM6MOFW57KD5IQZLXPRG7AQLLYN 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-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.67 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: C6D7E2791F X-Spam-Score: 0.67 X-Migadu-Scanner: scn1.migadu.com X-TUID: BL1NAoCL6yQy This is an early version of a series to convert the remaining CLI (config, setup, and notmuch_command) to the new configuration framework. There are a few design decisions / compromomises that people might have opinions about. - The merged config API uses a notmuch_data_t as the primary "object". This mostly makes sense (since you nead a database anyway), but here I needed to add a function "notmuch_database_load_config", which does not really open the database. - There is a bit of growth in the public API here, including notmuch_database_get_config_values, and the config_pairs iterators. - The notmuch_config_set_{field} API is kept around soley for use in notmuch-setup - The location of the backups when upgrading is now configurable, with the default changing to a subdirectory. The latter change is arguably gratitous. - The behaviour of "notmuch config set" is changed with respect to storing in the database. Rather than silently doing so for a selected set of keys, it now does so optionally for any set of keys. I think this is positive for users, but requires e.g. a few tweaks to our test suite. It is conceivable that it may require some updates to advanced users scripts as well.