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 ms0.migadu.com with LMTPS id ADQ9JbwKCGFp7QAAgWs5BA (envelope-from ) for ; Mon, 02 Aug 2021 17:09:48 +0200 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 uF3TILwKCGG7KAAAbx9fmQ (envelope-from ) for ; Mon, 02 Aug 2021 15:09:48 +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 44F397A05 for ; Mon, 2 Aug 2021 17:09:48 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DC3992C042; Mon, 2 Aug 2021 11:09:35 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id BF17D2C03C for ; Mon, 2 Aug 2021 11:09:32 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 9037B5FD5C; Mon, 2 Aug 2021 11:09:32 -0400 (EDT) Received: (nullmailer pid 3234760 invoked by uid 1000); Mon, 02 Aug 2021 15:09:30 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 8/8] doc: document database search algorithm. Date: Mon, 2 Aug 2021 12:09:22 -0300 Message-Id: <20210802150922.3234616-9-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210802150922.3234616-1-david@tethera.net> References: <87bl9lx864.fsf@kisara.moe> <20210802150922.3234616-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: LUQUSPB5AALWBIZIZSQE6NM3XRIMYKL3 X-Message-ID-Hash: LUQUSPB5AALWBIZIZSQE6NM3XRIMYKL3 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=1627916988; 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=QTxuEtwhM4dqITF5/WI4P9xsc42Ns/TyzAYayL2pdTI=; b=XNmlrd1NDhhGFUMCzTVjlvDCmlkiTnL3aJmDNqwEayOfBFEwlbvqNX4gYQwkUsNH6qi9WV FJHizxOZvjMqleT8/qZNZ2j3t1KM8VlN16o1/pYVtcJCCrewxo1I4O4lKzlmJYa6LKZYk1 s8AeqN3yMASzUoMXWDfZBQHgzjibTqKF64KgVdS0z+qbLzHUOqyVE0SS+AuetYXgjwGOpV Tg+4WkQVFiBgPH2EgJ6t/v4DoMN/r31G/orxonSdD4Wj1v2UmKxsRjD4nGmL5BzMges3ht FfKnvpHNzl3v3nMfTfx01MjT1CuZcaRIS9eB/0xAU8NearU7I+gc++AQlDqDoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627916988; a=rsa-sha256; cv=none; b=j5Pu+U6PAYB3SWbkThmlL9DB9wLqbzNL20V5KFyqYYp76xemdlAT6/DLMs2HK6qILbvJlG w9xLx2FBgqFaPDkcO6+BgAVx5B2VHmVyX2eN6bluo2K6Rrrz8Q3W5vUqXWk1uahCCXaVSa iRKIKJrTtpwXLdE2vb1t4HEcqphHie8Tg32WGCS+psCFNRrKrU3ilP9JxEsMmWtYuwx/JB wByJFdjJwV1owm5HbwcKuHcfmJc3BZ0L3wkxZ3I5r4dwD4b4nWH3dP4hSYivacNDCmWOvZ LGyLdFBw6Lb0/AlfdczWuszHbfxYZ7ZlgCg+y826A4zUpditrTMhEQlEmCd9Jg== 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.53 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: 44F397A05 X-Spam-Score: 0.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: utYP/GAYp+SX Essentially a translation of the function _choose_database_path for human consumption. As a bonus, document environment variable NOTMUCH_DATABASE --- doc/man1/notmuch-config.rst | 21 ++++++++++++++++++++- doc/man1/notmuch.rst | 5 +++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst index 82fbb44c..07a9eaf0 100644 --- a/doc/man1/notmuch-config.rst +++ b/doc/man1/notmuch-config.rst @@ -60,7 +60,7 @@ paths are presumed relative to `$HOME` for items in section sub-directory named ``.notmuch`` if **database.mail\_root** is unset). - Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``. + Default: see :ref:`database` **database.mail_root** The top-level directory where your mail currently exists and to @@ -272,6 +272,25 @@ Notmuch configuration file search order: by :envvar:`NOTMUCH_PROFILE` environment variable if set, ``$HOME/.notmuch-config`` otherwise. +.. _database: + +DATABASE LOCATION +----------------- + +Notmuch database search order: + +1. Directory specified by :envvar:`NOTMUCH_DATABASE` environment variable. + +2. Directory specified by config key ``database.path``. + +3. ``$XDG_DATA_HOME/notmuch/`` where ```` + is defined by :envvar:`NOTMUCH_PROFILE` environment variable if + set, ``$XDG_DATA_HOME/notmuch/default`` otherwise. + +4. Directory specified by :envvar:`MAILDIR` environment variable. + +5. ``$HOME/mail`` + HOOKS ----- diff --git a/doc/man1/notmuch.rst b/doc/man1/notmuch.rst index 6bd1dc03..de4c91ac 100644 --- a/doc/man1/notmuch.rst +++ b/doc/man1/notmuch.rst @@ -164,6 +164,11 @@ of notmuch. Specifies the location of the notmuch configuration file. See :any:`notmuch-config(1)` for details. +.. envvar:: NOTMUCH_DATABASE + + Specifies the location of the notmuch database. See + :any:`notmuch-config(1)` for details. + .. envvar:: NOTMUCH_PROFILE Selects among notmuch configurations. See :any:`notmuch-config(1)` -- 2.30.2