Bug 306456 - Feature Request: Some help in using the RegExps in ReplyPrefixes/ForwardPrefixes
Summary: Feature Request: Some help in using the RegExps in ReplyPrefixes/ForwardPrefixes
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: config dialog (show other bugs)
Version: 4.8.4
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-08 14:46 UTC by Jonas.Bechtel
Modified: 2012-09-11 23:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Prefix configuration dialog as it may look (110.33 KB, image/png)
2012-09-11 23:42 UTC, Jonas.Bechtel
Details

Note You need to log in before you can comment on or make changes to this bug.
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