Bug 343313 - kate, kwrite Checking Spelling doesn't works.
Summary: kate, kwrite Checking Spelling doesn't works.
Status: RESOLVED DUPLICATE of bug 335988
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL: https://bugs.archlinux.org/task/43564
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-26 08:52 UTC by firewalker
Modified: 2016-09-07 15:10 UTC (History)
22 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description firewalker 2015-01-26 08:52:13 UTC
The spelling check doesn't work on kate and kwrite 5.

Reproducible: Always

Steps to Reproduce:
1. Try to execute a spelling check to a file.




Console output:

katepart:
katepart:
katepart: new range: [ (0, 0) -> (1, 0) ]
katepart: old range: [ (0, 0) -> (0, 0) ]
katepart: [ (1, 0) -> (1, 0) ]
katepart: [ (0, 0) -> (0, 11) ]
katepart: KTextEditor::DocumentPrivate(0x961d400) [ (0, 0) -> (0, 10) ]
katepart: KTextEditor::DocumentPrivate(0x961d400) [ (0, 0) -> (0, 10) ] "en_US"
katepart: added [ (0, 0) -> (0, 10) ] "en_US" to the queue, which has a length of 1
katepart:
katepart: erasing range QPair([(0, 0) -> (0, 10) ] , "en_US" )
katepart: added [ (0, 0) -> (1, 0) ]
katepart: exited as there is nothing to do
katepart: KTextEditor::DocumentPrivate(0x961d400) [ (0, 0) -> (1, 0) ]
katepart: [ (0, 0) -> (1, 0) ]
katepart: KTextEditor::DocumentPrivate(0x961d400) [ (0, 0) -> (0, 10) ]
katepart: KTextEditor::DocumentPrivate(0x961d400) [ (0, 0) -> (0, 10) ] "en_US"
katepart: added [ (0, 0) -> (0, 10) ] "en_US" to the queue, which has a length of 1
katepart: for the range [ (0, 0) -> (0, 10) ]
katepart: [ (0, 0) -> (0, 10) ]
katepart: next spell checking "dictioarri"
SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "en_US"
HunspellDict::HunspellDict( const QString& lang ): "en_US"
dddddd 0xae0ec90
SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "en_US"
HunspellDict::HunspellDict( const QString& lang ): "en_US"
dddddd 0xae16470
SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "en_US"
HunspellDict::HunspellDict( const QString& lang ): "en_US"
dddddd 0xae16308
SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "en_US"
HunspellDict::HunspellDict( const QString& lang ): "en_US"
dddddd 0x9f77660
SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "en_US"
HunspellDict::HunspellDict( const QString& lang ): "en_US"
dddddd 0xae161b8
SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "en_US"
HunspellDict::HunspellDict( const QString& lang ): "en_US"
dddddd 0x9f77f50
katepart: on-the-fly spell check done, queue length 0
Comment 1 mokush 2015-02-16 21:10:04 UTC
Can also confirm it's happening on Kubuntu Vivid, with Kate 5.0.0 using KDE Frameworks 5.7.0. 

Here's the console output
(for opening Kate, typing something and activating Automatic Spell Check):

kf5.kiconthemes: "Theme tree: (Breeze)"
QObject::disconnect: No such slot KRecursiveFilterProxyModel::_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)
The font for use in the terminal has not been matched exactly. Perhaps it has not been found properly.
The font for use in the terminal has not been matched exactly. Perhaps it has not been found properly.
 HunspellClient::HunspellClient
katepart: created
QObject::connect: No such signal KateBuffer::respellCheckBlock(KTextEditor::DocumentPrivate*,int,int)
katepart: 
katepart: 
katepart: 
katepart: new range:  [ (0, 0)  ->  (1, 0) ]
katepart: old range:  [ (0, 0)  ->  (0, 0) ]
katepart: [ (1, 0)  ->  (1, 0) ]
katepart: [ (0, 0)  ->  (0, 14) ]
katepart: KTextEditor::DocumentPrivate(0x962380) [ (0, 0)  ->  (0, 14) ]
katepart: KTextEditor::DocumentPrivate(0x962380) [ (0, 0)  ->  (0, 14) ]  ""
katepart: added [ (0, 0)  ->  (0, 14) ]  "" to the queue, which has a length of 1
katepart: 
katepart: erasing range  QPair([(0, 0)  ->  (0, 14) ]  , "" ) 
katepart: added [ (0, 0)  ->  (1, 0) ] 
katepart: exited as there is nothing to do
katepart: KTextEditor::DocumentPrivate(0x962380) [ (0, 0)  ->  (1, 0) ]
katepart: [ (0, 0)  ->  (1, 0) ]
katepart: KTextEditor::DocumentPrivate(0x962380) [ (0, 0)  ->  (0, 14) ]
katepart: KTextEditor::DocumentPrivate(0x962380) [ (0, 0)  ->  (0, 14) ]  ""
katepart: added [ (0, 0)  ->  (0, 14) ]  "" to the queue, which has a length of 1
katepart: for the range  [ (0, 0)  ->  (0, 14) ] 
katepart: [ (0, 0)  ->  (0, 14) ]
katepart: next spell checking "sdfsdfsdfsdfds"
katepart: on-the-fly spell check done, queue length  0
Comment 2 Michal Humpula 2015-02-17 17:47:05 UTC
I can't reproduce this. Is the other spellcheck functionality working? When you try to switch language, do you see languages in selection or is it empty?
Comment 3 firewalker 2015-02-17 17:59:02 UTC
I can see the languages listed.

http://i.imgur.com/N7PRHFD.png
Comment 4 Michal Humpula 2015-02-17 18:17:30 UTC
Is spellcheck "dialog" working? I.E. does it find the problematic words? It might be problem in KF5, not directly in kate/kwrite. Is there a way to test the spellcheck in another KF5 application?
Comment 5 firewalker 2015-02-17 18:23:38 UTC
No it doesn't work. Tested for Kate and Kwrite.

Can you name any other application using the same spelling mechanism?
Comment 6 mokush 2015-02-17 18:24:16 UTC
I can also see the list of languages in the `dictionary` selector, and select different ones, but with the same result (eg. no words underlined regardless of what I type).

The Spellcheck dialog is working and finding wrong words correctly. The only broken part seems to be the `on-the-fly spell check` that's supposed the underline wrong words.

I'm running Konversation version 1.6-beta1 based on KDE Frameworks 5.7.0, and the on-the-fly spell check is working there. If you type wrong words in the text input, they are underlined.

So it seems to be related only to ktexteditor.
Comment 7 Michal Humpula 2015-02-17 19:13:58 UTC
This is a problem with current implementation using QSaveFile to write data. That one is using QTemporaryFile and that one is forcing new file to be created with 0600 rights, which makes sense for temporary file.

There is no way I can see to tell the QTemporaryFile(Engine) to create file with different rights. So the only way IMHO to circumvent this would to compute the correct rights after the KTE is trought saving.
Comment 8 Michal Humpula 2015-02-17 19:14:32 UTC
Oh, crap wrong window:) Sorry guys:)
Comment 9 Landis 2015-02-25 06:07:10 UTC
I can say without a doubt, SpellCheck does Not work in opensuse 13.1 distro of KDE.
My kate version is:
# kate --version
Qt: 4.8.6
KDE Development Platform: 4.14.4
Kate: 3.14.4
* in yast, Kate is reported as ver: 4.14.3-1.31

libktexteditor - Advanced Text Editor library 
version: 4.14.3-1.31 (i think)

I have hunspell, ispell, ipsell-american installed and in 'Configure Kate' > Spelling it looks to be using Engish (US of A)
Comment 10 Nathan Baker 2015-04-16 14:03:25 UTC
What is the status on this bug? It's a pretty major regression in functionality, and I'm confused why it's not getting more attention.
Comment 11 Kåre Särs 2015-04-16 19:10:26 UTC
On-the-fly-spell checking _setting_ is/was broken in Frameworks 5.7

A temporary fix is committed in master to read the setting, but a proper fix needs changes in Sonnet. I have a review request for Sonnet pending.

Spellchecking works otherwise here.

Landis: Your problem is probably a distro/config problem, because spellchecking works in Kate in Kubuntu as far back as I remember :)
Comment 12 Nathan Baker 2015-04-16 19:13:04 UTC
@Kåre Särs - You are correct. Manually initiating a spell check works fine. It's just on-the-fly checking which does not work.
Comment 13 Sally A. haj 2015-06-01 17:38:54 UTC
I have the same issue with spell checking in Fedora 22 KDE, with Plasma 5.
Spell checking doesn't work with kate, konversation or any kde apps.
I use kf5-sonnet 5.10.0
Comment 14 miciu 2015-09-23 07:39:28 UTC
This bug is still there.
Archlinux
kf5 5.14.1
kmail 15.08.1

Autospellcheck in kmail does not work. Manual spell check works.
Comment 15 Dominik Haumann 2016-04-25 08:09:17 UTC
Is this still an issue with current Frames 5.21 and KWrite/Kate?
Comment 16 mokush 2016-04-25 08:42:06 UTC
Works for me now.

Kate 15.12.3.
KDE Frameworks 5.20.0
Arch
Comment 17 Peter Kreussel 2016-04-25 08:59:40 UTC
Has been working for some time on my system, too.
Arch Linux, Kate 15.12.3, Frameworks 5.21.0

It also works in KWrite and KMail 5.1.3.
Comment 18 miciu 2016-04-25 09:15:17 UTC
Works here too. Arch Linux with:
Kate 16.04.0
KDE Frameworks 5.21.0
Qt 5.6.0 (built against 5.6.0)
KMail 5.2.0
Comment 19 Greg Lepore 2016-04-25 11:19:23 UTC
Tools->Spelling->Spelling works for me, but Automatic Spell Checking still does not work. Kubuntu packages.

Kate 15.12.3

Kate Part
Version 5.21.0
Using:
KDE Frameworks 5.21.0
Qt 5.5.1 (built against 5.5.1)
The xcb windowing system
Comment 20 Wulf 2016-04-25 18:52:56 UTC
Neither automatic nor manual spell checking works (german spell checking)
Arch
Kate 16.04.0
Frameworks 5.21
Qt 5.6

I didn't check for Qt5.5
Comment 21 Alex 2016-05-10 14:52:13 UTC
For me it was a font issue. Automatic spellchecking (English) works just fine with the DejaVu font, but not with the Hack font. Manual checking works with any font.

Arch
Kate 16.04 / Kile Git
Frameworks 5.21
Qt 5.6
Comment 22 Tim Taylor 2016-05-14 11:56:14 UTC
(In reply to Alex from comment #21)
> For me it was a font issue. Automatic spellchecking (English) works just
> fine with the DejaVu font, but not with the Hack font. Manual checking works
> with any font.
> 
> Arch
> Kate 16.04 / Kile Git
> Frameworks 5.21
> Qt 5.6

Thank you so much for that info, Alex!

I have been suffering from lack of spellcheck highlighting in Kate since Kate 15.10 and continuing into 16.04 (I'm using Kubuntu). I had set my default system font to Liberation Sans, and that turned out to be the cause of no spellcheck highlighting in Kate. I've now set my default font in Kate to Noto Mono, and highlighting works again. 

Really glad to have got this annoying problem fixed at last!
Comment 23 caryoscelus 2016-05-18 20:53:23 UTC
Same here, automatic spell checking working/not working depends on font. Liberation Mono doesn't work, DejaVu Sans Mono does.

However, i should add that even with Liberation autochecking works for some lines: those that have dynamic word wrap continuation and aren't bold.

// debian sid, kate 15.08.3, kde frameworks 5.16.0, qt 5.5.1
Comment 24 negora 2016-06-28 08:07:48 UTC
Hello:

I've done some tests of the automatic spell checking in Kate, in different distributions, using the "British English" dictionary. And these are my results:

   Kubuntu 16.04 ..................... Sonnet 5.18.0 ......... Behaves buggy
   Kubuntu 16.04 + Backports PPA ..... Sonnet 5.22.0 ......... Behaves buggy
   Fedora 24 ......................... Sonnet 5.22.0 ......... It (almost) does not work
   Manjaro 2016-06-25 ................ Sonnet 5.23.0 ......... It (almost) does not work

Where I say "Behaves buggy", I mean the following:

   Right words are not marked ............................................. OK
   Wrong words (like "ddff") are marked ................................... OK
   Wrong words that look like right words (such as "copolo") are marked ... WRONG

So, if I input words like "tetete" or "macoco", which doesn't exist in English, the spell checker accepts them. It's really weird.

Where I say "It (almost) does not work", I mean that it marks some words randomly, in an erratic way. So in this state, this functionality is useless.

In all cases I've installed all the available dictionaries of the language (myspell, aspell, hunspell). Changing the font hasn't had any effect in my case.
Comment 25 Kåre Särs 2016-06-28 09:46:59 UTC
negora: How is marking "copolo" as a spelling error wrong?

I'm running Kubuntu 16.04 with KDE Neon packages and "copolo", "tetete" and "macoco" are marked as spelling mistakes as they should.
Comment 26 negora 2016-06-28 10:04:33 UTC
Kåre Särs: I'm sorry, but I didn't explain myself very well. Where it said "WRONG", it should have said "FAILS". I didn't mean that marking that words as spelling errors were wrong. What was wrong was not marking them, of course. In all the distributions that I mentioned, this thing failed.

Could you tell me which versions of Kate and Sonnet are currently packaged in KDE Neon? That way, I could open a ticket in the respective bug report systems of the other distributions.
Comment 27 negora 2016-07-04 22:07:21 UTC
After many attempts, I've found out the cause of my problem with the automatic spell checker. The distributions that I've tested have an option enabled by default in "System Settings" -> "Regional Settings" -> "Spell Check". It's called "Enable autodetection of language", and it's supposed to allow the spell checking in documents or fragments with words in multiple languages, simultaneously.

However, even when I only had the English dictionaries installed in my system,  the spell checking didn't work well. As I already said, It accepted words that aren't right words in British English, which is the language of my system. Some minutes ago, I've tried to disable this option, and the spell checking has started to work fine.

So, Is it a bug in the auto-detection of the language? Or is it the expected behaviour? (because of something that I still don't know). 

Thank you.
Comment 28 dE 2016-07-31 03:45:14 UTC
Please check for this bug in your kwrite

https://bugs.kde.org/show_bug.cgi?id=366291

And vote
Comment 29 Christoph Cullmann 2016-09-07 15:10:32 UTC
Problem with line height :/

*** This bug has been marked as a duplicate of bug 335988 ***