I have an friend which replies every message with "Antwort: " instead of the usual version "Re: ". Most mail clients don't recognize that, and i thought that of kmail too and wrote mails like "Re: Antwort: Re: Antwort: Subject". When I discovered the configurable prefix recognition, I was a bit helpless how to describe the new prefix: - Do I have to add an blank/whitespace expression after ":" ? - Does the prefix work? (Ok, I made that with sending me test messages. But that doesn't make fun when testing a more complicated prefix) - Which RegExp implementation is used (as you might find there some helpful specs)? Reproducible: Always Steps to Reproduce: To invoke the config page, invoke the config dialog, select "Editor" page and activate tab "Subject" That's more an idea how to improve usability without reducing the configuration possibilities, not an urgent wish.
QString replacePrefixes( const QString& str, const QStringList &prefixRegExps, bool replace, const QString &newPrefix ) { bool recognized = false; // construct a big regexp that // 1. is anchored to the beginning of str (sans whitespace) // 2. matches at least one of the part regexps in prefixRegExps QString bigRegExp = QString::fromLatin1("^(?:\\s+|(?:%1))+\\s*") .arg( prefixRegExps.join(QString::fromLatin1(")|(?:")) ); I don't know what is the real problem ? and the improvement ?
I add an example how the configuration dialog could look like. The idea behind this is that you can follow on other's mail prefix (but only for particular prefixes) so the other one's mail program doesn't see at all the trouble it produces with it's strange prefixes. The auto detection I refer to is meant the following way: When you receive a message with an "In-Reply-To:" header field and this message referred to is present in your database you can compare the subject you sent and the subject the other one gave you and automatically get new prefixes. Maybe there could be a dialog which asks weather you want to add that prefix to your prefix recognition?
Created attachment 73843 [details] Prefix configuration dialog as it may look