unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Cc: David Bremner <david@tethera.net>
Subject: [PATCH 38/39] doc: describe new config framework
Date: Fri,  5 Feb 2021 09:26:53 -0400	[thread overview]
Message-ID: <20210205132654.3258292-39-david@tethera.net> (raw)
In-Reply-To: <20210205132654.3258292-1-david@tethera.net>

Remove STORED IN DATABASE discussion, describe search rules.
Currently profiles seem a bit pointless. They will make more sense
when they apply to databases as well.
---
 doc/man1/notmuch-config.rst | 43 +++++++++++++++++++++++++++++--------
 doc/man5/notmuch-hooks.rst  |  6 +++---
 2 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst
index 769f336a..bc597957 100644
--- a/doc/man1/notmuch-config.rst
+++ b/doc/man1/notmuch-config.rst
@@ -17,10 +17,6 @@ DESCRIPTION
 The **config** command can be used to get or set settings in the notmuch
 configuration file and corresponding database.
 
-Items marked **[STORED IN DATABASE]** are only in the database.  They
-should not be placed in the configuration file, and should be accessed
-programmatically as described in the SYNOPSIS above.
-
 **get**
     The value of the specified configuration item is printed to
     stdout. If the item has multiple values (it is a list), each value
@@ -54,6 +50,11 @@ The available configuration items are described below.
 
     Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``.
 
+**database.hook_dir**
+
+    Directory containing hooks run by notmuch commands. See
+    **notmuch-hooks(5)**.
+
 **user.name**
     Your full name.
 
@@ -134,7 +135,7 @@ The available configuration items are described below.
 
     Default: ``true``.
 
-**index.decrypt** **[STORED IN DATABASE]**
+**index.decrypt**
     Policy for decrypting encrypted messages during indexing.  Must be
     one of: ``false``, ``auto``, ``nostash``, or ``true``.
 
@@ -187,7 +188,7 @@ The available configuration items are described below.
 
     Default: ``auto``.
 
-**index.header.<prefix>** **[STORED IN DATABASE]**
+**index.header.<prefix>**
     Define the query prefix <prefix>, based on a mail header. For
     example ``index.header.List=List-Id`` will add a probabilistic
     prefix ``List:`` that searches the ``List-Id`` field.  User
@@ -202,7 +203,7 @@ The available configuration items are described below.
     (since notmuch 0.30, "compact" and "field_processor" are
     always included.)
 
-**query.<name>** **[STORED IN DATABASE]**
+**query.<name>**
     Expansion for named query called <name>. See
     **notmuch-search-terms(7)** for more information about named
     queries.
@@ -214,8 +215,32 @@ The following environment variables can be used to control the behavior
 of notmuch.
 
 **NOTMUCH\_CONFIG**
-    Specifies the location of the notmuch configuration file. Notmuch
-    will use ${HOME}/.notmuch-config if this variable is not set.
+    Specifies the location of the notmuch configuration file.
+
+**NOTMUCH_PROFILE**
+    Selects among notmuch configurations.
+
+FILES
+=====
+
+CONFIGURATION
+-------------
+
+If ``NOTMUCH_CONFIG`` is unset, notmuch tries (in order)
+
+- ``$XDG_CONFIG_HOME/notmuch/<profile>/config`` where ``<profile>`` is
+  defined by ``$NOTMUCH_PROFILE`` or "default"
+- ``${HOME}/.notmuch-config<profile>`` where ``<profile>`` is
+  ``.$NOTMUCH_PROFILE`` or ""
+
+Hooks
+-----
+
+If ``database.hook_dir`` is unset, notmuch tries (in order)
+
+- ``$XDG_CONFIG_HOME/notmuch/<profile>/hooks`` where ``<profile>`` is
+  defined by ``$NOTMUCH_PROFILE`` or "default"
+- ``<database.path>/.notmuch/hooks``
 
 SEE ALSO
 ========
diff --git a/doc/man5/notmuch-hooks.rst b/doc/man5/notmuch-hooks.rst
index de2ed0c2..c509afb3 100644
--- a/doc/man5/notmuch-hooks.rst
+++ b/doc/man5/notmuch-hooks.rst
@@ -5,15 +5,15 @@ notmuch-hooks
 SYNOPSIS
 ========
 
-$DATABASEDIR/.notmuch/hooks/*
+<hook_dir>/{pre-new, post-new, post-insert}
 
 DESCRIPTION
 ===========
 
 Hooks are scripts (or arbitrary executables or symlinks to such) that
 notmuch invokes before and after certain actions. These scripts reside
-in the .notmuch/hooks directory within the database directory and must
-have executable permissions.
+in a directory defined as described in **notmuch-config(1)**. They
+must have executable permissions.
 
 The currently available hooks are described below.
 
-- 
2.30.0

  parent reply	other threads:[~2021-02-05 13:29 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 13:26 v5 merged config David Bremner
2021-02-05 13:26 ` [PATCH 01/39] lib: add _notmuch_string_map_set David Bremner
2021-02-05 13:26 ` [PATCH 02/39] lib: cache configuration information from database David Bremner
2021-02-05 13:26 ` [PATCH 03/39] lib: add stub for notmuch_database_open_with_config David Bremner
2021-02-05 13:26 ` [PATCH 04/39] lib/open: add support for config profiles and default locations David Bremner
2021-02-05 13:26 ` [PATCH 05/39] CLI: generalize notmuch_config_mode_t David Bremner
2021-02-05 13:26 ` [PATCH 06/39] lib/config: add notmuch_config_key_{get,set} David Bremner
2021-02-05 13:26 ` [PATCH 07/39] lib/open: load default values for known configuration keys David Bremner
2021-02-05 13:26 ` [PATCH 08/39] CLI: add (unused) database argument to subcommands David Bremner
2021-02-05 13:26 ` [PATCH 09/39] util: add strsplit_len: simplified strtok with delimiter escaping David Bremner
2021-02-05 13:26 ` [PATCH 10/39] lib/config: add config values iterator David Bremner
2021-02-05 13:26 ` [PATCH 11/39] lib/config: make values iterators restartable David Bremner
2021-02-05 13:26 ` [PATCH 12/39] CLI/count: switch to new configuration framework David Bremner
2021-02-05 13:26 ` [PATCH 13/39] cli/dump: convert to new config framework David Bremner
2021-02-05 13:26 ` [PATCH 14/39] lib: add notmuch_config_get_bool David Bremner
2021-02-05 13:26 ` [PATCH 15/39] CLI/restore: convert to new config framework David Bremner
2021-02-05 13:26 ` [PATCH 16/39] CLI/insert: " David Bremner
2021-02-05 13:26 ` [PATCH 17/39] cli/reindex: convert " David Bremner
2021-02-05 13:26 ` [PATCH 18/39] CLI/reply: convert to " David Bremner
2021-02-05 13:26 ` [PATCH 19/39] CLI/{search,address}: convert to new configuration framework David Bremner
2021-02-05 13:26 ` [PATCH 20/39] cli/config: add accessor for config file name David Bremner
2021-02-05 13:26 ` [PATCH 21/39] CLI/show: mostly switch show to new config framework David Bremner
2021-02-06 19:21   ` [PATCH] " David Bremner
2021-02-05 13:26 ` [PATCH 22/39] cli/tag: convert " David Bremner
2021-02-05 13:26 ` [PATCH 23/39] lib/config: add _notmuch_config_cache David Bremner
2021-02-05 13:26 ` [PATCH 24/39] lib: split notmuch_database_compact David Bremner
2021-02-05 13:26 ` [PATCH 25/39] cli/compact: convert to new configuration framework David Bremner
2021-02-05 13:26 ` [PATCH 26/39] bindings/notmuch2: add missing crypto error status codes David Bremner
2021-02-05 13:26 ` [PATCH 27/39] lib/config: add NOTMUCH_CONFIG_NEW_IGNORE David Bremner
2021-02-05 13:26 ` [PATCH 28/39] lib/open: factor out choosing database path David Bremner
2021-02-05 13:26 ` [PATCH 29/39] lib: add NOTMUCH_STATUS_NO_CONFIG David Bremner
2021-02-05 13:26 ` [PATCH 30/39] lib/database: move n_d_create* to open.cc David Bremner
2021-02-05 13:26 ` [PATCH 31/39] lib: add NOTMUCH_STATUS_DATABASE_EXISTS David Bremner
2021-02-05 13:26 ` [PATCH 32/39] lib: introduce notmuch_database_create_with_config David Bremner
2021-02-05 13:26 ` [PATCH 33/39] cli/new: refactor database upgrade code David Bremner
2021-02-05 13:26 ` [PATCH 34/39] cli/new: convert to new config framework David Bremner
2021-02-05 13:26 ` [PATCH 35/39] lib/config: add HOOK_DIR David Bremner
2021-02-05 13:26 ` [PATCH 36/39] lib/open: set HOOK_DIR on open David Bremner
2021-02-05 13:26 ` [PATCH 37/39] CLI: use configured hook directory David Bremner
2021-02-05 13:26 ` David Bremner [this message]
2021-02-05 13:26 ` [PATCH 39/39] lib: add missing private status values David Bremner
2021-02-07  0:19   ` Complete conversion of notmuch-show to new config framework David Bremner
2021-02-07  0:19     ` [PATCH 1/4] lib: publish API for notmuch_database_reopen David Bremner
2021-02-07  0:19     ` [PATCH 2/4] lib: save path of xapian database in notmuch struct David Bremner
2021-02-07  0:19     ` [PATCH 3/4] lib: support reopening databases for write access David Bremner
2021-02-07  0:19     ` [PATCH 4/4] CLI/show: complete conversion to new configuration framework David Bremner
2021-02-07  1:02 ` v5 merged config David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210205132654.3258292-39-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).