[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Request for advice on making spell check ignore quoted text
From:       Dave Corrie <kde () davecorrie ! com>
Date:       2002-01-30 23:05:56
[Download RAW message or body]

Hi,

If no one else is working on this, then I'd like to make a modification 
to KMail that would stop the spell checker from checking quoted text in 
the compose window (ie lines that start with "> " or whatever 
indentation you have set in your preferences). 

After a little investigation there seems to be three ways to approach 
this:

1) Create a copy of the buffer which excluded quoted lines and call 
KSpell::check().

2) Create a QStringList of words, which excludes the words on quoted 
lines and call KSpell::checkList().

3) Call KSpell::checkWord() with every word not on a quoted line.

I don't think #2 gets us anything more than #1 but would probably have 
a greater memory overhead, so I'll discard that option.

#1 requires more memory than #3 and needs a little routine to translate 
from positions in the buffer sent to KSpell to positions in the 'real' 
buffer.

#3 would need much less memory, but will "sacrifice speed when checking 
large numbers of words" according to the KSpell docs.

It comes down to the usual memory/cpu trade off. My personal preference 
is #1, but I'd be interested to hear other peoples' opinions.

Are there other alternatives that I have not considered?

Are there any planned KMail developments which would swing the balance 
in one direction?

And finally, would there need to be a user preference to turn off this 
functionality or would it be better to have it always on (thus avoiding 
clutter in the prefs pages)?

I look forward to hearing your thoughts.

Cheers,

Dave
_______________________________________________
kmail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic