After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794041 - RFE: "Viewing" message filters for setting highlights and modifications
RFE: "Viewing" message filters for setting highlights and modifications
Product: evolution
Classification: Applications
Component: Mailer
3.26.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Reported: 2018-03-04 13:03 UTC by Paul Wise
Modified: 2018-03-05 16:36 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement

Description Paul Wise 2018-03-04 13:03:36 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.
Comment 1 Milan Crha 2018-03-05 16:36:55 UTC
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.