Bug 159972 - Add scriptable templates
Summary: Add scriptable templates
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kmail
Classification: Applications
Component: templates (show other bugs)
Version: 1.9.8
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-27 21:36 UTC by Maciej Pilichowski
Modified: 2012-08-19 00:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2008-03-27 21:36:03 UTC
Version:            (using KDE 3.5.8)
Installed from:    SuSE RPMs

I just thought what could save me a lot of time, and I guess a lot of people.

Variant templates. Let's say I define reply template. Fine. But then, really, for several people I use different phrases, so I would like to have
[ to address ] my friend 1 | my friend 2
the template is then like this:
......................


Then, if I reply Kmail would search for the first match in variant templates, if found -- template would be used. If not -- global/default reply template would be used.

The same for forward -- however here it could lead to some confusion, because most likely it would be dependent not "from" but "to".

But anyway, for reply I think it would be great :-)
Comment 1 Maciej Pilichowski 2008-03-29 12:15:53 UTC
Hmm, I thought about it a bit more and I go with the wish even further:

a) keeps the things like they are now, just simple text + "macros"
b) provide script language (I mean it could be Python, bash, perl, whatever) with predefined variables, or one global hash table

So when you (as user) would like to define "reply" you could do it as today, or select:
[ ] run script

And in the same dialog you will write the script, and for scripted templates kmail will run them and insert the result of the script.

Why such complex (? it is not that complex, after all running script it would be not Kmail part, but interpreter) wish -- it could be one of killer features of KMail. This way user could not only react to specific addresses, but also to a gender of the author! For polish it would be a joy to see automatic responses genderated
Szanowna Pani,

for women, and for men

Szanowny Panie.

Oh, and another note, since Kmail part would be only feeding global hash, and getting the result it could be even better

[ ] run the script in < Ruby / Perl / Python / you name it >

Now I vote definitively for scripted templates :-)
Comment 2 Thomas McGuire 2008-04-03 20:20:49 UTC
This is to some extend possible, with the "Process with external programs" commands. But I guess the addressee is not passed on to the script, but I'm not sure.
Comment 3 Maciej Pilichowski 2008-04-03 20:48:28 UTC
Thomas thank you, however current possibilities are not well suited for scripting. With system command you can't get values of macros
echo %QUOTE
produces
%QUOTE

and the rest are limited to predefined values only.

But it is closer than I thought. It is a pity I am busy to near end of the year, I would like to implement this feature :-)
Comment 4 Myriam Schweingruber 2012-08-18 08:24:43 UTC
Thank you for your feature request. Kmail1 is currently unmaintained so we are closing all wishes. Please feel free to reopen a feature request for Kmail2 if it has not already been implemented.
Thank you for your understanding.
Comment 5 Luigi Toscano 2012-08-19 00:21:52 UTC
Instead of creating a new feature request, please confirm here if the wishlist is still valid for kmail2.