[Users] templates

Holger Berndt berndth at gmx.de
Wed Aug 12 20:29:55 CEST 2015


On Di, 11.08.2015 23:58, Michael wrote:

>> On Mo, 10.08.2015 18:09, Michael wrote:
>> 
>> >But back to my question, IS there a way ? Maybe postprocessing ?
>> 
>> Depending on how you need to determine which replies should get the
>> modified subject string, it might also be possible with the Python
>> plugin. So what is your criterion?
>
>Uh, it's very simple, because the sorting is already done by filtering -> folders.
>
>Just anything replied within that specific folder shall get the new subject header.

Hm, that's actually not so simple, because the Python plugin didn't
provide access to the contained folder for MessageInfo objects. I just
added that, so using git master, you can now put something like the following
into the ~/.claws-mail/python-scripts/auto/compose_any:

#==================================================================
if clawsmail.compose_window.replyinfo and clawsmail.compose_window.replyinfo.Folder.identifier == "#mh/Mail/foo/bar":
    clawsmail.compose_window.set_subject("My hardcoded subject")
    clawsmail.compose_window.set_modified(False)
#==================================================================

In older versions, you might be able to reproduce the criteria that you used
for sorting into the target folder in the first place (many pieces of info like 
subject, headers etc were also available before today's extension of the plugin).

Holger



More information about the Users mailing list