From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SO5dL2MRbWAZHwEAgWs5BA (envelope-from ) for ; Wed, 07 Apr 2021 03:56:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kGhCKWMRbWDbFAAA1q6Kng (envelope-from ) for ; Wed, 07 Apr 2021 01:56:51 +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 6C234AE5C for ; Wed, 7 Apr 2021 03:56:51 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7527E29069; Tue, 6 Apr 2021 21:56:09 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id B2A4C28359 for ; Tue, 6 Apr 2021 21:55:46 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 9D61B5FA96; Tue, 6 Apr 2021 21:55:46 -0400 (EDT) Received: (nullmailer pid 2964242 invoked by uid 1000); Wed, 07 Apr 2021 01:55:35 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 18/28] CLI/notmuch: switch notmuch_command to notmuch_config_get Date: Tue, 6 Apr 2021 22:55:20 -0300 Message-Id: <20210407015530.2964017-19-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210407015530.2964017-1-david@tethera.net> References: <20210407015530.2964017-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: X7MSPOGGIKM7ZYM37C3OABJ25Y7A32J7 X-Message-ID-Hash: X7MSPOGGIKM7ZYM37C3OABJ25Y7A32J7 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=1617760611; 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=J2MBefnMhagT03LzfAnn8UkU9oLQZtFfqnfwoWca6f8=; b=DRX8Uso3p9z/8VzL7iEZpdqKnAD61u9gWH94VK/yEI7HPuNu/Wj7kFEMlGgJ18qbBl7LcH J0hgXRVfh2mVLMejYyk73/ImrUuJ6z8TUXK0kAi47N+HpxRX3m5W+7g8YNt1ztZ0oq/ntY xBpk05s7bvzmA3VmE+teHTW6Pmm4FoA/QBaBo243Xn6gCINr+igmE3yGkGme1Qa5PCrIDX 9I3RL82HObm8T5eaCi8DhujYtP8JoYmtlelq9SCCTkrnRkR9q4MNKUJ+27yyeO45FhdsK7 69xfHzh1MjzAKFX1T2t4R/a39p3tE5w4YWpsM06UK4mxRxCLC8uLy0iG81p/2Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617760611; a=rsa-sha256; cv=none; b=K/DmS1dQ8LJYXnv8NaYSZmjHy249YEBq2InloH6T0jdwBX9nGrFRrqqy+pJqeeln/vbPAp 5GnqwFr747KLWCxAZscYc1ZyZpOlUZeT2ezyRM8ujTvWIc35ZScjperkevDurK3oS/wxAf CHLqfVhETNCDtrBAVB9sm9rnS+QCoZ410l5vaVKy4zMkqq+24EWnLpOgaNMnCK+07jc4sk rjscu+XuUd3W3SxAoC/gkANbLf+HoijqNntBkpOCDiz1dzZs9WQcy9l9u8V8eWOR358lpB W+lOB8iRio15+qBHppGrpnxH7zC3SUKmhXXaM8Fj1FutuyXvjRq5hkbymf9wTw== ARC-Authentication-Results: i=1; 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-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 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 6C234AE5C X-Spam-Score: -0.88 X-Migadu-Scanner: scn0.migadu.com X-TUID: NZEqIwQe2eU3 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 4132e561..ff9ad18b 100644 --- a/notmuch.c +++ b/notmuch.c @@ -391,7 +391,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) { @@ -422,8 +422,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.2