setting NOTMUCH_CONFIG in hooks

David Bremner david at tethera.net
Wed Jun 3 07:12:36 PDT 2020


Uwe Kleine-König <uwe at kleine-koenig.org> writes:

> Hello,
>
> when I run
>
> 	notmuch --config=$HOME/.notmuch-config-work new
>
> NOTMUCH_CONFIG isn't set when the hooks are running. This would however
> be quite useful such that e.g. afew uses the right database. Of course I
> could do
>
> 	NOTMUCH_CONFIG=$HOME/.notmuch-config-work notmuch new
>
> instead, but then it would be consequent to drop the --config option
> from notmuch completely :-)

Not really opposed, but it does seem like a wishlist item to me.

Two comments

1) I have planned for some weeks now to tear open the config handling,
which might affect this.

2) It would make sense to define an explicit set of environment
variables preserved or reset in hook environment at the same time as
this proposed change.



More information about the notmuch mailing list