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 gOvSL8QcA2AXHwAA0tVLHw (envelope-from ) for ; Sat, 16 Jan 2021 17:05:08 +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 cHSkK8QcA2BoLgAAB5/wlQ (envelope-from ) for ; Sat, 16 Jan 2021 17:05:08 +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) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 60C949404CE for ; Sat, 16 Jan 2021 17:05:08 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4D9B02BF5D; Sat, 16 Jan 2021 12:04:38 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 245CF2BF3E for ; Sat, 16 Jan 2021 12:04:24 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id 1FA5F5FF47; Sat, 16 Jan 2021 12:04:24 -0500 (EST) Received: (nullmailer pid 842419 invoked by uid 1000); Sat, 16 Jan 2021 17:04:15 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 20/38] cli/config: add accessor for config file name Date: Sat, 16 Jan 2021 13:03:48 -0400 Message-Id: <20210116170406.842014-21-david@tethera.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210116170406.842014-1-david@tethera.net> References: <20210116170406.842014-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: LZVAFOVQOLBZFFKVWPXRN37PDNHU4MDV X-Message-ID-Hash: LZVAFOVQOLBZFFKVWPXRN37PDNHU4MDV 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.87 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: 60C949404CE X-Spam-Score: -0.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: dPvAeMHS6VWa 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 e8fb0323..a026002a 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -334,6 +334,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 4fa274c7..0193401f 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.29.2