all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ispell.el and multilanguage lines.
@ 2015-12-15 23:14 Nikolay Kudryavtsev
  2015-12-16  3:37 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Nikolay Kudryavtsev @ 2015-12-15 23:14 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-07 22:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15 23:14 ispell.el and multilanguage lines Nikolay Kudryavtsev
2015-12-16  3:37 ` Eli Zaretskii
2016-03-07  1:18   ` Nikolay Kudryavtsev
2016-03-07 16:38     ` Eli Zaretskii
2016-03-07 21:10       ` Nikolay Kudryavtsev
2016-03-07 21:17         ` Eli Zaretskii
2016-03-07 22:03           ` Nikolay Kudryavtsev

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.