<div dir="ltr"><div>Hello,</div><div><br></div><div>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.<br><div><br></div><div>[alot]: <a href="https://github.com/pazz/alot/issues/1396">https://github.com/pazz/alot/issues/1396</a></div><div>[afew]: <a href="https://github.com/afewmail/afew/pull/233">https://github.com/afewmail/afew/pull/233</a></div></div><div><br></div><div>Rather than reimplementing it in bindings, I see two possible solutions:</div><div><br></div><div>1. Move the logic to `notmuch_database_open` itself.</div><div>2. Extract into a separate C function, use it in `notmuch_config_open`, and expose through bindings.</div><div><br></div><div>What do you think?</div><div></div><div><br></div><div>Cheers,</div><div>Kirill<br></div></div>