Closed guludo closed 1 year ago
This PR partially addresses https://github.com/pazz/alot/pull/1610#issuecomment-1506483026
Looks good. thank you. I should really fix this travis CI thing, or better replace it by GitHub actions..
The change in e500326 broke the test test_parsing_notmuch_config_with_non_bool_synchronize_flag_fails.
The main benefit from this is that we get the defaults directly from notmuch and do not risk using inconsistent configuration values.
A good example of this is getting the database path. Getting the path directly from the notmuch config file is not enough, because the user might be using the default location with no explicit entry in the file. Since notmuch does is a bit of logic notmuch to get the database path (see section "DATABASE LOCATION" in man page for notmuch-config(1)), it is better to get it directly from "notmuch config".
Since get_notmuch_setting() now always returns a string, also refactor the call to settings.get_notmuch_setting('maildir', 'synchronize_flags') for this new reality.