Open muradm opened 5 years ago
Hello, this is interresting case I think you could just use the variable $NOTMUCH_CONFIG to set your config file, but I aggree this is misleading and should be fixed, see: https://github.com/afewmail/afew/blob/e3968d6f0b709ef32da9d3fb597de0acc1c140bc/afew/commands.py#L65
I have checked a bit the notmuch way to pass a different config file you can use the variable or use '--config=' so we could use that to fix you problem, as I dont have the envirronment to test it well I suggest you go ahead and test this fix and submit a pull-request after that. https://notmuchmail.org/manpages/notmuch-1/
Anyway this need to be fixed, so if I can not help you make the patch, I will fix it on my own.
I think you could just use the variable $NOTMUCH_CONFIG to set your config file
As notmuch itself respect XDG_CONFIG_HOME
environment variable now (see https://notmuchmail.org/manpages/notmuch-config-1/), if a user set XDG_CONFIG_HOME
but not NOTMUCH_CONFIG
, afew cannot find the notmuch config at $XDG_CONFIG_HOME/notmuch/default/config
.
This could be and is a real problem if one wants to use only XDG_CONFIG_HOME
and avoid NOTMUCH_CONFIG
.
If I didn't miss anything, NotmuchSettings.py
currently only check NOTMUCH_CONFIG
environment variable, before falling back to the default ~/.notmuch-config
.
The implementation seems trivial so I may propose a PR by the end of the month.
Here probably have to pass that config.