Lot's of refactorings were necessary to make this fix possible. As a result, a lot of function in the UI module are now typed in the RI monad.
Note: I did not test runtime loading, I hope I didn't break anything
This makes it much more convenient to read a riot file with a mail client like mutt.
Additionally, I appended '@riot' to every message-id, because mutt needs it for threading. I also add a new header line 'From: Riot' to newly created entries, which makes them look a bit nicer in a mail client.
Note: It is not necessary to convert your old riot files in any way. However, if you want threading in mutt, than you have to append '@riot' to all message ids and to all 'In-Reply-To' headers.
I have only adapted some functions in the Main module to the new monad, but the other modules should be adapted too.
This patch depends on my former patch for saving changes immediately to disk.
It introduces an additional field in the Config datatype named options. For now, options has only one field 'save_always'. If save_always is True, all changes are written directly to disk. If save_always is False, changes are only written when requested by the user.