Bug 306456

Summary: Feature Request: Some help in using the RegExps in ReplyPrefixes/ForwardPrefixes
Product: [Applications] kmail2 Reporter: Jonas.Bechtel
Component: config dialogAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: wishlist CC: montel
Priority: NOR    
Version: 4.8.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Prefix configuration dialog as it may look

Description Jonas.Bechtel 2012-09-08 14:46:02 UTC
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.
Comment 1 Laurent Montel 2012-09-09 10:27:11 UTC
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 ?
Comment 2 Jonas.Bechtel 2012-09-11 23:36:18 UTC
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?
Comment 3 Jonas.Bechtel 2012-09-11 23:42:00 UTC
Created attachment 73843 [details]
Prefix configuration dialog as it may look