astroidmail / astroid

A graphical threads-with-tags style, lightweight and fast, e-mail client for Notmuch
http://astroidmail.github.io
Other
606 stars 65 forks source link

Incompatible with notmuch v0.32 `database.mail_root` config #709

Open OJFord opened 2 years ago

OJFord commented 2 years ago

The database.mail_root config option of notmuch allows storing the notmuch indices (database.path) separately to the source directories.

By default, it falls back on database.path for backwards-compatibility, but if set astroid is unable to view threads, since it tries to load ${database.path}/${path to eml} instead of ${database.mail_root}/${path to eml} where it is actually located.

Somewhat relatedly, notmuch has defaults but astroid requires (almost all of) them to be explicitly set in config. If astroid used notmuch config get database.mail_root, then it would not be necessary to re-implement notmuch's fallback (or environment variables, etc.). It would also avoid the need to specify notmuch config location in astroid config, even when a location on notmuch's default search path is used.

OJFord commented 2 years ago

This is due to use of notmuch_database_open, rather than the new notmuch_database_open_with_config, some more detail in vhdirk/notmuch-rs#34, but essentially the former is stuck with ignoring config in order to provide a compatible upgrade path, (so explained D. Bremner on IRC) and as a result mail_root can't be specified and is assumed to equal db_path.