GNOME Bugzilla – Bug 794041
RFE: "Viewing" message filters for setting highlights and modifications
Last modified: 2018-03-05 16:36:55 UTC
I would like the ability to apply an arbitrary set of text highlights and message modifications to each of a bunch of different type of messages. I was thinking there could be a "Viewing" message filter type, which could apply highlights and modify messages for viewing (but not the original mails).
When I get some cron mail from my servers, I want to hide parts of the mail that are not errors.
When I get apt-listchanges mail from my laptop, I want to highlight indicators of spelling mistakes, so I can contribute those to spelling dictionaries like codespell and lintian.
Thanks for a bug report. None of the two examples can be done in a generic way, they are too specific. I can understand to highlight some words in the text (similarly to Ctrl+Shift+F), but having specific formatter, which processes the text of the message in some way is a task for 3rd-party plugin, not for the evolution core.
Depending on the Content-Type of the part you want to apply your filter for, you can create a custom EMailFormatterExtension object , which is registered through an EExtension interface when the module is loaded. It can look like this thing , where the expected output is an HTML code.
A very complex example of such module can be found here , where the main functionality is around usage of the function declared at  and its corresponding source file . You can also extend the example module , which had been added to make it easier to create such plugins.