help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ispell.el and multilanguage lines.


From: Nikolay Kudryavtsev
Subject: ispell.el and multilanguage lines.
Date: Wed, 16 Dec 2015 02:14:58 +0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

Here's the problem I've found with ispell.el. As a bilingual person and an avid org-mode user I often have lines in multiple languages. The fact that Russian language has a different alphabet is great for the purpose of spell checking, since I can check English first, then switch dictionary and check Russian. And spell checker is supposed to ignore words not in the dictionary alphabet. ispell-dictionary-alist has all the facilities needed for this and it should work in theory. Here's where it fails in practice - ispell.el uses a function called ispell-region and what it does is that it sends buffer line by line and whether the line gets sent is decided by ispell-get-line where the criteria is (re-search-forward ispell-casechars end t) - that is if there's a match with the language for the current dictionary the whole line gets sent. And of course words in that line that are in a different language get considered misspelled by the spell checker.

I tried checking in bug reports, but this does not seem to have been reported yet. I'll submit it as a bug later.

There's a possible workaround if you're using hunspell, by using multiple dictionaries at the same time, like this: ("ru_RU,en_US" "[[:alpha:]]" "[^[:alpha:]]" "['0-9]" t ("-d" "ru_RU,en_US") nil koi8-r)
But this creates a mess in user dictionaries.

--
Best Regards,
Nikolay Kudryavtsev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]