unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Database path discovery in bindings
@ 2020-04-19 18:53 Kirill Elagin
  2020-04-22 18:28 ` Tomi Ollila
  0 siblings, 1 reply; 3+ messages in thread
From: Kirill Elagin @ 2020-04-19 18:53 UTC (permalink / raw)
  To: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 815 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1131 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-22 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-19 18:53 Database path discovery in bindings Kirill Elagin
2020-04-22 18:28 ` Tomi Ollila
2020-04-22 18:48   ` Kirill Elagin

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).