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). For example: 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 [1], which is registered through an EExtension interface when the module is loaded. It can look like this thing [2], where the expected output is an HTML code. A very complex example of such module can be found here [3], where the main functionality is around usage of the function declared at [4] and its corresponding source file [5]. You can also extend the example module [6], which had been added to make it easier to create such plugins. [1] https://git.gnome.org/browse/evolution/tree/src/em-format/e-mail-formatter-extension.h [2] https://git.gnome.org/browse/evolution/tree/src/em-format/e-mail-formatter-text-plain.c [3] https://git.gnome.org/browse/evolution/tree/src/modules/itip-formatter/ [4] https://git.gnome.org/browse/evolution/tree/src/modules/itip-formatter/e-mail-formatter-itip.h [5] https://git.gnome.org/browse/evolution/tree/src/modules/itip-formatter/e-mail-formatter-itip.c [6] https://wiki.gnome.org/Apps/Evolution/Extensions#Example_Module