You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since ConfigList requires a Database, which can itself only be opened from a path, it's not possible to do the equivalent of notmuch config get database.path in order to find the database to open.
It'd be nice to have a convenience method for this, either returning the path (without using ConfigList) or for opening the db too.
Looking at the C API I think there's nothing for it but to shell out for it. Other than inspecting the env var and default search path of course, but then that's subject to break if notmuch itself changes or adds to it.
I'm imagining something like:
let db_path = notmuch::get_current_database_path();
or similar. (Or worse, make assumptions like 'it's always at ~/mail', or '$MAILDIR is always set', or erroneously point at the .notmuch dir which is only used if database.mail_root is unset, etc.)
The text was updated successfully, but these errors were encountered:
Since
ConfigList
requires aDatabase
, which can itself only be opened from a path, it's not possible to do the equivalent ofnotmuch config get database.path
in order to find the database to open.It'd be nice to have a convenience method for this, either returning the path (without using
ConfigList
) or for opening the db too.Looking at the C API I think there's nothing for it but to shell out for it. Other than inspecting the env var and default search path of course, but then that's subject to break if notmuch itself changes or adds to it.
I'm imagining something like:
in place of currently needing:
or similar. (Or worse, make assumptions like 'it's always at ~/mail', or '$MAILDIR is always set', or erroneously point at the
.notmuch
dir which is only used ifdatabase.mail_root
is unset, etc.)The text was updated successfully, but these errors were encountered: