[Users] The reply mark in subject (R: Re:) recognition
Slavko
linux at slavino.sk
Wed Aug 8 11:08:26 CEST 2012
Hi Michael,
thanks a lot!
Dňa Tue, 7 Aug 2012 23:53:20 +0200 Michael Gmelin <freebsd at grem.de>
napísal:
> with the following content:
>
> #!/usr/bin/env python
> # save this as ~/.claws-mail/python-scripts/auto/compose_any
> # Workaround for R: in reply headers
>
> import re
>
> clawsmail.compose_window.set_subject(re.sub(
> r"^(Re|Fwd|Fw): R:", r"\1:",
> clawsmail.compose_window.get_subject()
> ))
I tried it today and it works for me! :-)
I only improve the regexp to:
r"^(Re|Fwd|Fw):( Re?:)+"
because your solution don't works with the subject in format "R: Re:
Subject" and produces the "Re: Re: Subject" line. Now it works for any
"R: Re" combination:
Subject -> Re: Subject
R: Subject -> Re: Subject
R: Re: Subject -> Re: Subject
Re: R: Re: Subject -> Re: Subject
R: Re: R: Re: Subject -> Re: Subject
Only one thing is left - the subject manipulating changes the content and
closing compose window without any other change invokes the confirmation
dialog (Save, Concept, Cancel) - of course, only when the subject line was
changed. Is here solution to prevent showing this confirmation from this
script, please? Same flag, or something else, i don't know.
> As an alternative, in case you want to recompile claws yourself and
> maintaining a patch to it, you could also change utils.c, since as I
> learned, the German versions are already covered by claws mail. This is
> done in utils.c around line 3740, where it reads:
Thanks, but I prefer to use the distribution packages, because the
maintainers maintain the updates for me, and building own version only for
one people - i encounter this only now in years…
regards
--
Slavko
http://slavino.sk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20120808/1d10c239/attachment.sig>
More information about the Users
mailing list