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 wIDGIKraQGDqagAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 13:03:38 +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 0PKTHKraQGDFRwAAB5/wlQ (envelope-from ) for ; Thu, 04 Mar 2021 13:03:38 +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) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3946615FF9 for ; Thu, 4 Mar 2021 14:03:38 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4A7B227B37; Thu, 4 Mar 2021 08:02:22 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1E06226C4A for ; Thu, 4 Mar 2021 08:02:00 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id CB6D15FA96; Thu, 4 Mar 2021 08:01:59 -0500 (EST) Received: (nullmailer pid 4047198 invoked by uid 1000); Thu, 04 Mar 2021 13:01:45 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 17/27] CLI/notmuch: switch notmuch_command to notmuch_config_get Date: Thu, 4 Mar 2021 09:01:29 -0400 Message-Id: <20210304130139.4046183-18-david@tethera.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210304130139.4046183-1-david@tethera.net> References: <20210304130139.4046183-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: TZT4BGUVWLNO2BVXI2TYCLTATB4J2GOI X-Message-ID-Hash: TZT4BGUVWLNO2BVXI2TYCLTATB4J2GOI 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614863018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8W0J6qCANj6mN/6D1aX8kDvWFykxppqNBeatqX0yN+4=; b=sbyQHOWC1F781HcbRCe9Sf6yH80ilub2qUs9hvTk+ucYQLP22itlAD9lpG+nVcveai8pHM gEzTW1bDxG1XsKMtQHSf3Nt3AsKEh615ZzJt7WZAIa128nYnKL7HgZfjth+lPgZMCPIgnW eKXpdc0Ky/DBu8dgznHNUOjDRo4mO8w7JztriHk98MWxWx4B+/l2fzdT/qBNvXsEMl2wWV WokuvhhrgTAKaF09J1oImWddcn5Jc6JxKrmLfl09ZSlbDgT8k+Av0uebaHEFkr80bXWEem /k6ETvqVQRySQobOqJxTtJp+WWoP3zbVPUZgz8o1PcG7ySbyD0UcL8LKwZf1lA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614863018; a=rsa-sha256; cv=none; b=Le8Rhsc5BjN7ih9MMNyVpYkqAH8smxGV6hrhJ7eOksZOhvaOUHklRAP3H7179SmR1PA9Xd vKaU/kHLH/NgalNrM0j1KVw70+QgZFK8gzee4BdSA03PNuhUmiX+dYTO/0XvoFYkCiEboO RUewyjRWhoaDFsa2Z8hI7AZAmwUMvD92CKo2d3m20RwKwM6O21dFMrZC8cwh4+WIsCOlCb ERaIeiJo/4uNNM134FSmaowSU+Co0EBgnV4BK83hg6j6Z/T24/lbnyMoUa/N5RAWAshSNA VR1wfdzRa9C7jMPnObn09lCrlbv+3hU/fFP30PZf2TSxubc+66eHwyd0XfQ7+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: -0.88 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-Migadu-Queue-Id: 3946615FF9 X-Spam-Score: -0.88 X-Migadu-Scanner: scn0.migadu.com X-TUID: McsoledQeIni The goal at this point is to remove the dependence on notmuch_config_get_* without breaking any existing functionality. This is a step towards removing notmuch_config_get_* in a future commit. --- notmuch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notmuch.c b/notmuch.c index 6ff6473e..093af0a5 100644 --- a/notmuch.c +++ b/notmuch.c @@ -380,7 +380,7 @@ notmuch_command (notmuch_config_t *config, /* Notmuch is already configured, but is there a database? */ db_path = talloc_asprintf (config, "%s/%s", - notmuch_config_get_database_path (config), + notmuch_config_get (notmuch, NOTMUCH_CONFIG_DATABASE_PATH), ".notmuch"); if (stat (db_path, &st)) { if (errno != ENOENT) { @@ -411,8 +411,8 @@ notmuch_command (notmuch_config_t *config, "or any other interface described at https://notmuchmail.org\n\n" "And don't forget to run \"notmuch new\" whenever new mail arrives.\n\n" "Have fun, and may your inbox never have much mail.\n\n", - notmuch_config_get_user_name (config), - notmuch_config_get_user_primary_email (config)); + notmuch_config_get (notmuch, NOTMUCH_CONFIG_USER_NAME), + notmuch_config_get (notmuch, NOTMUCH_CONFIG_PRIMARY_EMAIL)); return EXIT_SUCCESS; } -- 2.30.1