Re: setting NOTMUCH_CONFIG in hooks

Subject: Re: setting NOTMUCH_CONFIG in hooks

Date: Wed, 03 Jun 2020 11:12:36 -0300

To: Uwe Kleine-König,


From: David Bremner

Uwe Kleine-König <> 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.

notmuch mailing list