From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: ispell.el and multilanguage lines.
Date: Wed, 16 Dec 2015 05:37:20 +0200 [thread overview]
Message-ID: <83y4cv12tr.fsf@gnu.org> (raw)
In-Reply-To: <56709EF2.2080302@gmail.com> (message from Nikolay Kudryavtsev on Wed, 16 Dec 2015 02:14:58 +0300)
> From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
> Date: Wed, 16 Dec 2015 02:14:58 +0300
>
> 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.
Emacs doesn't yet have a concept of the language of the text,
certainly not when several languages are mixed in a buffer.
> 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)
Yes, and the latest code base (of what will become Emacs 25.1)
supports this feature of Hunspell.
> But this creates a mess in user dictionaries.
I believe that "mess" is fixed in the current code. So I suggest you
try the latest emacs-25 branch.
next prev parent reply other threads:[~2015-12-16 3:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 23:14 ispell.el and multilanguage lines Nikolay Kudryavtsev
2015-12-16 3:37 ` Eli Zaretskii [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y4cv12tr.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.