wcheck-mode icon indicating copy to clipboard operation
wcheck-mode copied to clipboard

Wish: Add hook for the situation when an incorrect word is detected

Open GregorZattler opened this issue 7 years ago • 1 comments

The package guess-language guesses the language (using heuristics of trigrams) of the current paragraph (which provides for using different languages within one buffer). It could automatically change wchecks language configuration iff there was a hook in wcheck for the situation when an incorrect word is detected. This would be nice even if current buffers text is all in one language, because one wouldn't have to switch languages when e.g. writing several emails in different languages.

I therefore wish for such a hook (see it's issue #8 where this is discussed).

GregorZattler avatar Feb 14 '17 23:02 GregorZattler

To add some context: Currently guess-language works with Flyspell but I added some infrastructure to make it eventually possible to use other spell-checkers. The way guess-language interacts with the spell-checker is the following: When Flyspell detects an incorrect word, it notifies guess-language (via flyspell-incorrect-hook). Guess-language then checks the language and when it is different than the current language used in the spell-checker, it switches Flyspell's dictionary (ispell-change-dictionary) and rechecks the current paragraph. The goal is to replicate this protocol with wcheck but having had a look at wcheck's code, I don't see how that would be possible. Suggestions welcome.

tmalsburg avatar Feb 15 '17 10:02 tmalsburg