Database path discovery in bindings
Kirill Elagin
kirelagin at gmail.com
Sun Apr 19 11:53:57 PDT 2020
Hello,
Notmuch contains a bit of logic for “normalising” the database path: it can
be relative to $HOME and fallsback to $MAILDIR or $HOME/mail. However, this
logic is implemented in `notmuch_config_open` and is not available through
bindings. So if a third-party tool wants to discover the database, it will
either do this incorrectly ([alot]) or will have to roll its own
implementation ([afew]). Neither option is good.
[alot]: https://github.com/pazz/alot/issues/1396
[afew]: https://github.com/afewmail/afew/pull/233
Rather than reimplementing it in bindings, I see two possible solutions:
1. Move the logic to `notmuch_database_open` itself.
2. Extract into a separate C function, use it in `notmuch_config_open`, and
expose through bindings.
What do you think?
Cheers,
Kirill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20200419/31d15018/attachment.htm>
More information about the notmuch
mailing list