Database path discovery in bindings

Kirill Elagin kirelagin at gmail.com
Wed Apr 22 11:48:53 PDT 2020


On Wed, Apr 22, 2020 at 9:28 PM Tomi Ollila <tomi.ollila at iki.fi> wrote:
>
> There has been thoughts to dump the configuration file, and put the
> configuration to the database -- so then the bindings can just open the
> database to find the configuration.... oh wait...
>
> In this case we'd find the database in $NOTMUCH_DATABASE_DIR[ECTORY?] or
> in $HOME/mail/.notmuch/... if that env var did not exist.

That sounds reasonable to me.

>
> There are at least 2 issues to solve with this approach:
>
> 1: SMOP

Given that named queries are already stored in the database (even though
considered part of config), it sounds very doable.

> 2: how to edit the configuration using text editor (preserving comments),
>    i.e. export and import functionality

I’m not sure this is relevant, if the configuration is stored in the db.
Especially comments.
Again, named queries as a case in point.
A simple `notmuch config list` is “esport”, `notmuch config set
--batch` can be added.

> 3. review latency (especially w/ large patches...) ;/
>
>
> Tomi

However, all this sounds as an entirely independent proposal, even
though a reasonable one.

It is a much bigger change than potential options for solving the
problem that I raised,
and, most importantly, it doesn’t even solve it, because the
difficulty of discovering the db,
with all the falling-back logic and relative paths would remain
_exactly_ the same.


More information about the notmuch mailing list