From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OCxRHUdvCmEoAgEAgWs5BA (envelope-from ) for ; Wed, 04 Aug 2021 12:43:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KK8jGUdvCmGBEAAA1q6Kng (envelope-from ) for ; Wed, 04 Aug 2021 10:43:19 +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 23623AA10 for ; Wed, 4 Aug 2021 12:43:19 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id BBB8D2C0F6; Wed, 4 Aug 2021 06:42:58 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 42CB22C0DF for ; Wed, 4 Aug 2021 06:42:48 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 3AAA15FD5C; Wed, 4 Aug 2021 06:42:48 -0400 (EDT) Received: (nullmailer pid 3986534 invoked by uid 1000); Wed, 04 Aug 2021 10:42:42 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 7/7] doc: document database search algorithm. Date: Wed, 4 Aug 2021 07:42:36 -0300 Message-Id: <20210804104236.3986362-8-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210804104236.3986362-1-david@tethera.net> References: <20210804104236.3986362-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: A2UA55FGNHQOEINYRRZY4QUG2DXLYS4Z X-Message-ID-Hash: A2UA55FGNHQOEINYRRZY4QUG2DXLYS4Z 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=1628073799; 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=WsK/V6knXobpYKqQQzdz6pPme9r4H28+8Pw77Q2e7Yw=; b=kljmzwdymfzT+M2CgN7f56BJrF9zUmolVLM2vH115Ry6WB58+5DsE/Z/EueArfwW8Insjz P24o3815Ji9kec686d2zmkak34z4kwmXdYVi8P0PE0pWXSqKj40YTRYtPekux3xbj89vaZ OCgS4fFVVSlM+gXSfz4CRgnep9HXIpZxUDZZKz5EIyhWo4p84LizBvbuIp+ijlUrk3St4O D62yUZHt0F6IRDHNkhJ7i1GLMv5S1Oz0qAskCSo3ipKBchXIuNmauwE6Mcie9kCRCperrp vUvNAo7hN6+A61QTRjeYTF/ytKBQn911UYRxoKYfmiRjkSX0j+aNOk1MHEcKlA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628073799; a=rsa-sha256; cv=none; b=bARcGsd3qyNjx3YIQQEgwrlZuhHUA+XPz29eYlJmU2Exe4eRpzkI1r7Z5HwOicN0+2DLnA D/tetmbjom2nmvBk7yXgUyCuTicceUuiCjtFHm+FeMUtSveP3b5nBse0FCLumKsL0py9Ht xjRNI6dO/xJjjj/gkvQ3ONWn57hT6Ee320KFqoyOq6Uyaass7onHFoW1WLBcLb8sNI33l9 M1PVaL5dRn7p5/uzF2dWhzX+u62yH0DdJR6EIMX9ugjmDm5uW52Qsw9uu8CJ8IyiYzTL47 vNyD+MoEasmieAh4a1I6SAG9Owk1ZyhI9G6sTkUfvwGyEpAQJKpGIbQhZ8uzqQ== 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.98 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: 23623AA10 X-Spam-Score: -0.98 X-Migadu-Scanner: scn1.migadu.com X-TUID: rFhPGHjcBEPU 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..c6ee3036 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