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

Use libnotmuch to read notmuch config #756

Open jorsn opened 4 weeks ago

jorsn commented 4 weeks ago

This would require libnotmuch >= 5.4.

@ibuclaw

In my opinion, this issue is not a priority until after the next release, because it does not fix broken/bad behavior of astroid. The latter is the most important in the short term.

ibuclaw commented 4 weeks ago

This would require libnotmuch >= 5.4.

@ibuclaw

In my opinion, this issue is not a priority until after the next release, because it does not fix broken/bad behavior of astroid. The latter is the most important in the short term.

Agreed, I already have a possible patch ready for this.

https://github.com/ibuclaw/astroid/commit/a7c8ab57ed2910b368c7068a0ce52045716c52b5

jorsn commented 4 weeks ago

Thanks, I'll have a look at this. If it is easy/ready and cleans up code, we might still do it for the new release.

jorsn commented 4 weeks ago

This could also fix #714.

ibuclaw commented 3 weeks ago

Thanks, I'll have a look at this. If it is easy/ready and cleans up code, we might still do it for the new release.

I think mostly the tests haven't been properly fixed up, but I've gone through each fail case to make sure it's handled gracefully.

In the astroid config, only the path to the notmuch config is required (no changes here then). This is then passed to the *_open_with_config function to get the rest, rather than doing all parsing on astroid's side.

I don't think I've checked whether the notmuch config can be inferred from the library/environment when missing from astroid.