From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KBdmGRS0Ll8wBQAA0tVLHw (envelope-from ) for ; Sat, 08 Aug 2020 14:17:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4G0zFRS0Ll/MYwAA1q6Kng (envelope-from ) for ; Sat, 08 Aug 2020 14:17:56 +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 F0B5F94066A for ; Sat, 8 Aug 2020 14:17:55 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D45A329B0D; Sat, 8 Aug 2020 10:17:29 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id F155329ADE for ; Sat, 8 Aug 2020 10:17:13 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id E9BB55FA66; Sat, 8 Aug 2020 10:17:13 -0400 (EDT) Received: (nullmailer pid 1124292 invoked by uid 1000); Sat, 08 Aug 2020 14:17:04 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 17/19] cli/config: add accessor for config file name Date: Sat, 8 Aug 2020 11:16:51 -0300 Message-Id: <20200808141653.1124111-18-david@tethera.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200808141653.1124111-1-david@tethera.net> References: <20200808141653.1124111-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: XVAVN25HFJPSPCFFXCQBTBW24DAMLVCM X-Message-ID-Hash: XVAVN25HFJPSPCFFXCQBTBW24DAMLVCM 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: 0ua/WiFeaxEf This is intended for use in temporary code transitioning to the new configuration system. The name is chosen to avoid cluttering the notmuch_config_* namespace further with non-library functions. --- notmuch-client.h | 2 ++ notmuch-config.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/notmuch-client.h b/notmuch-client.h index ebd43e8d..2ec84678 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -332,6 +332,8 @@ void notmuch_config_set_search_exclude_tags (notmuch_config_t *config, const char *list[], size_t length); +const char * +_notmuch_config_get_path (notmuch_config_t *config); int notmuch_run_hook (const char *db_path, const char *hook); diff --git a/notmuch-config.c b/notmuch-config.c index 19c2ddb3..c7b05d8c 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -510,6 +510,9 @@ notmuch_config_close (notmuch_config_t *config) talloc_free (config); } +const char *_notmuch_config_get_path (notmuch_config_t *config) { + return config->filename; +} /* Save any changes made to the notmuch configuration. * * Any comments originally in the file will be preserved. -- 2.28.0