From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yMa7NwBIHWBHQwAA0tVLHw (envelope-from ) for ; Fri, 05 Feb 2021 13:28:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MNJ0MwBIHWAYcQAAbx9fmQ (envelope-from ) for ; Fri, 05 Feb 2021 13:28:32 +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 9A0FD940309 for ; Fri, 5 Feb 2021 13:28:32 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 77DD21FC54; Fri, 5 Feb 2021 08:27:36 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id C2FB31FBB6 for ; Fri, 5 Feb 2021 08:27:14 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id AE7906067F; Fri, 5 Feb 2021 08:27:14 -0500 (EST) Received: (nullmailer pid 3258450 invoked by uid 1000); Fri, 05 Feb 2021 13:27:02 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 35/39] lib/config: add HOOK_DIR Date: Fri, 5 Feb 2021 09:26:50 -0400 Message-Id: <20210205132654.3258292-36-david@tethera.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205132654.3258292-1-david@tethera.net> References: <20210205132654.3258292-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: ZGPFDPFVPLWB3ZYLGR4BSXHCYK4C2ADV X-Message-ID-Hash: ZGPFDPFVPLWB3ZYLGR4BSXHCYK4C2ADV 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.93 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: 9A0FD940309 X-Spam-Score: -0.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: KA49LtyUjH0N The hook directory configuration needs to be kept in synch with the other configuration information, so add scaffolding to support this at database opening time. --- lib/config.cc | 3 +++ lib/notmuch.h | 1 + test/T590-libconfig.sh | 1 + 3 files changed, 5 insertions(+) diff --git a/lib/config.cc b/lib/config.cc index 4c0cfe92..948751bc 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -390,6 +390,8 @@ _notmuch_config_key_to_string (notmuch_config_key_t key) { switch (key) { case NOTMUCH_CONFIG_DATABASE_PATH: return "database.path"; + case NOTMUCH_CONFIG_HOOK_DIR: + return "database.hook_dir"; case NOTMUCH_CONFIG_EXCLUDE_TAGS: return "search.exclude_tags"; case NOTMUCH_CONFIG_NEW_TAGS: @@ -428,6 +430,7 @@ _notmuch_config_default (void *ctx, notmuch_config_key_t key) { return "inbox;unread"; case NOTMUCH_CONFIG_SYNC_MAILDIR_FLAGS: return "true"; + case NOTMUCH_CONFIG_HOOK_DIR: case NOTMUCH_CONFIG_NEW_IGNORE: case NOTMUCH_CONFIG_USER_NAME: case NOTMUCH_CONFIG_PRIMARY_EMAIL: diff --git a/lib/notmuch.h b/lib/notmuch.h index 5e07a01a..5a5d99c0 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -2460,6 +2460,7 @@ notmuch_config_list_destroy (notmuch_config_list_t *config_list); typedef enum _notmuch_config_key { NOTMUCH_CONFIG_FIRST, NOTMUCH_CONFIG_DATABASE_PATH = NOTMUCH_CONFIG_FIRST, + NOTMUCH_CONFIG_HOOK_DIR, NOTMUCH_CONFIG_EXCLUDE_TAGS, NOTMUCH_CONFIG_NEW_TAGS, NOTMUCH_CONFIG_NEW_IGNORE, diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index 4edc53f1..e2050b50 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -333,6 +333,7 @@ EOF cat <<'EOF' >EXPECTED == stdout == MAIL_DIR +NULL inbox;unread NULL -- 2.30.0