Bug 323086 - [PATCH] Fix some of the stuff that the spell checker incorrectly flags as misspelled
Summary: [PATCH] Fix some of the stuff that the spell checker incorrectly flags as mis...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (other bugs)
Version First Reported In: Git
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-01 19:30 UTC by Michael
Modified: 2013-08-08 15:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 4.11
Sentry Crash Report:


Attachments
Screenshot before (216.37 KB, image/png)
2013-08-01 19:31 UTC, Michael
Details
Screenshot after (215.36 KB, image/png)
2013-08-01 19:31 UTC, Michael
Details
Test case LaTeX code (1.33 KB, text/x-tex)
2013-08-01 19:31 UTC, Michael
Details
The patch for latex.xml (5.16 KB, patch)
2013-08-01 19:33 UTC, Michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2013-08-01 19:30:47 UTC
Hi,

The spell checker in Kile (and kate / katepart / kwrite) flags a lot of stuff that should not be flagged, such as arguments to commands like \input{mydata.tex} -- there's no need to spell check "mydata.tex". 

So, I've hacked at the latex.xml syntax file (newest, from git) a bit to cleanup some of the most obvious ones. The changes are:

1) Add a highlighting rule "Option Text" which is identical to "Normal Text" except spell checking disabled. 
2) Add a list of commands with type "SpecialCommand", and their options/parameters are highlighted via "Option Text"
3) Options to type "FancyLabel" are highlighted via "Option Text"
4) Changed the highlighting rule "Comment" to not be spell checked. Thanks to petko / papam2parky for this fix via https://bugs.launchpad.net/ubuntu/+source/kile/+bug/380860/comments/35

See attachments spelling1.png/spelling2.png for some common examples. I doubt this list is exhaustive. However it does make the spell checker considerably less annoying to use as one no longer needs to click "Ignore" dozens of times.

Reproducible: Always
Comment 1 Michael 2013-08-01 19:31:17 UTC
Created attachment 81516 [details]
Screenshot before
Comment 2 Michael 2013-08-01 19:31:35 UTC
Created attachment 81517 [details]
Screenshot after
Comment 3 Michael 2013-08-01 19:31:56 UTC
Created attachment 81518 [details]
Test case LaTeX code
Comment 4 Michael 2013-08-01 19:33:12 UTC
Created attachment 81519 [details]
The patch for latex.xml
Comment 5 Dominik Haumann 2013-08-08 15:49:27 UTC
Git commit 89a36fa5eb3e766c7fad7e01f8bf7b213dab6a1c by Dominik Haumann.
Committed on 08/08/2013 at 15:49.
Pushed by dhaumann into branch 'master'.

TeX: avoid spell checking where not wanted

Thanks to Michael for the patch!

FIXED-IN: 4.11.1

M  +44   -0    examples/syntax/highlight.tex
M  +34   -5    part/syntax/data/latex.xml

http://commits.kde.org/kate/89a36fa5eb3e766c7fad7e01f8bf7b213dab6a1c
Comment 6 Dominik Haumann 2013-08-08 15:50:40 UTC
Git commit 934d5022a10b8d24f473169f2ae282efd858509b by Dominik Haumann.
Committed on 08/08/2013 at 15:49.
Pushed by dhaumann into branch 'KDE/4.11'.

TeX: avoid spell checking where not wanted

Thanks to Michael for the patch!

FIXED-IN: 4.11.1

M  +44   -0    examples/syntax/highlight.tex
M  +34   -5    part/syntax/data/latex.xml

http://commits.kde.org/kate/934d5022a10b8d24f473169f2ae282efd858509b