> Date: Wed, 28 Mar 2012 21:18:21 +0200
> From: Agustin Martin
> > OTHERCHARS are not very important anyway, at least for languages I'm
> > interested in.
> > > Since currently it is not possible to ask hunspell for installed
> > > dictionaries (hunspell -D does not return control to the console)
> > > no one tried something similar for hunspell.
> > In what version do you have problems with -D?
> Hunspell 1.3.2. Does not return control until I press ^C. This may be
> if someone wants to know about installed hunspell dictionaries and
> something to play with that info, in a way similar to what is currently
> for aspell in ispell.el.
Well, to be fair to the Hunspell developers, the documentation doesn't
say that -D should exit after displaying the available dictionaries.
And the code really doesn't do that. However, with a simple 2-liner
(below) I can make it do what you want.
> > Since I wrote that, I found that the problem was due to a bug in
> > hunspell (which I fixed in my copy): it reported byte offsets of the
> > misspelled words, rather than character offsets. After fixing that
> > bug, there's no issue here anymore and nothing to fix in ispell.el.
> > There's a bug report with a patch about that in the hunspell bug
> > tracker, so there's reason to believe this bug will be fixed in a
> > future release.
> You mean
> I filed that bug one year ago and received no reply from hunspell
> maintainers. This year I received a followup with a proposed change, but
> there is still no reply to it.
I simply fixed this. This _is_ Free Software, isn't it?
> There is other problem that mostly hits re-using ispell default entries
> under hunspell
> [~ prefixed strings are treated as words in pipe mode]
Another easy fix (the feature is not implemented, so the code should
simply ignore such lines).
> that now stands for three years. I have waited in the hope this is fixed,
It's true that development seems to be slow, but then aspell
development is not exactly vibrant, either: both spellers hadn't a
release in many months.
Anyway, to me, Hunspell is a better tool, because of its support for
multiple dictionaries, which fixes the most annoying inconvenience in
Emacs spell-checking: the need to switch dictionaries according to the
language -- this is really a bad thing when you use Flyspell.
With multiple dictionaries, with very rare exceptions, one needs a
single entry in ispell-dictionary-alist, having all of the
dictionaries for languages one normally uses, [[:alpha:]] as
CASECHARS, and UTF-8 as the encoding.
> but I think I will soon commit to Emacs the same change I use for Debian,
> making sure extended-character-mode is nil for hunspell.
Probably a good idea.
--- src/tools/hunspell.cxx~0 2011-01-21 19:01:29.000000000 +0200
+++ src/tools/hunspell.cxx 2012-03-21 16:40:31.255690500 +0200
@@ -1756,6 +1763,7 @@ int main(int argc, char** argv)
fprintf(stderr, gettext("SEARCH PATH:\n%s\n"), path);
fprintf(stderr, gettext("AVAILABLE DICTIONARIES (path is not mandatory
for -d option):\n"));
search(path, NULL, NULL);
+ if (arg_files==-1) exit(0);
if (!privdicname) privdicname = mystrdup(getenv("WORDLIST"));