Bug 94008

Summary: smart heuristic to use fixed width for ASCII tables
Product: [Unmaintained] kmail Reporter: klee
Component: messageviewerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WAITINGFORINFO    
Severity: wishlist CC: bjoern, luigi.toscano
Priority: NOR    
Version First Reported In: 1.7.1   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description klee 2004-11-27 00:08:52 UTC
Version:           1.7.1 (using KDE KDE 3.3.1)
Installed from:    RedHat RPMs

It would be nice if KMail could use a smart heuristic to detect whether the message contains an ASCII table (requiring fixed width font for display, in order to line up the columns), and to switch automatically to fixed-width display for that portion of the message.

I suggest the following heuristic:

A line should be displayed fixed width if:

1. it consists of only dashes, only equals signs or only underscores; or

2. it contains 4 or more consecutive spaces.

I think you will be surprised how many ASCII tables these two simple heuristics catch, especially in the receipts sent out by online retailers.

A really smart table algorithm would, of course, look for words that start in the same column, etc., but I suspect that the above gets about 90% or more of the cases.
Comment 1 Myriam Schweingruber 2012-08-18 09:00:35 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 2 Luigi Toscano 2012-08-19 00:47:00 UTC
Instead of creating a new feature request, please confirm here if the wishlist is still valid for kmail2.