From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: ispell.el and multilanguage lines.
Date: Mon, 7 Mar 2016 04:18:20 +0300 [thread overview]
Message-ID: <56DCD6DC.60503@gmail.com> (raw)
In-Reply-To: <83y4cv12tr.fsf@gnu.org>
Sorry, for the very late reply, was somewhat busy, plus this stuff
required somewhat extensive extra checking.
> Emacs doesn't yet have a concept of the language of the text,
> certainly not when several languages are mixed in a buffer.
Ispell.el has CASECHARS and NOT-CASECHARS regular expressions in
ispell-dictionary-alist. This should be enough for the purpose of
differentiating Russian from English, if only it worked. But in
practice, those regexps are not used correctly, since now
ispell-get-line sends the whole line when re-search-forward finds
CASECHARS within it. While I'd agree that the number of use cases, where
CASECHARS and NOT-CASECHARS are useful is rather limited, fixing them
seems easier than removing.
> Yes, and the latest code base (of what will become Emacs 25.1)
> supports this feature of Hunspell.
I've tried that version, sure it fixes this bug
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20495>, but I actually
never had a problem with it in the first place, since you can avoid it
in 24.5 by setting ispell-dictionary-alist manually after
ispell-set-spellchecker-params had ran.
> I believe that "mess" is fixed in the current code. So I suggest you
> try the latest emacs-25 branch.
There's a really confusing bug with the way hunspell behaves with
Russian codepages on windows, that is not really emacs related. FYI:
I'm using current hunspell from ezwinports. Let's start hunspell in
windows cmd:
chcp 1251
hunspell -a "" -d ru_RU -i cp1251
тестовоеслово
testword
Both of the above would result in spellchecking failures. Let's add them
to the personal dictionary:
*тестовоеслово
*testword
#
Now, if you try exiting and starting hunspell again, both words would be
considered correct, since they are in your personal dictionary.
Here's where the bug comes into play. If you start some kind of bash, be
it cygwin bash, or msys and try using hunspell there:
hunspell -a "" -d ru_RU -i utf-8
testword would check ok, but тестовоеслово would fail. The same would
happen within emacs. My best guess is that this happens because of some
locale-connected environmental variable, that bash(and emacs) sets.
So, in the end, I'm stuck with aspell and running one spellcheck per
dictionary.
--
Best Regards,
Nikolay Kudryavtsev
next prev parent reply other threads:[~2016-03-07 1:18 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
2016-03-07 1:18 ` Nikolay Kudryavtsev [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56DCD6DC.60503@gmail.com \
--to=nikolay.kudryavtsev@gmail.com \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).