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

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

bug#24435: 25.1; Problem using Hunspell


From: Eli Zaretskii
Subject: bug#24435: 25.1; Problem using Hunspell
Date: Wed, 14 Sep 2016 19:57:10 +0300

> From: Dmitri Paduchikh <address@hidden>
> Date: Wed, 14 Sep 2016 20:33:53 +0500
> Cc: address@hidden
> 
> > I guess older Hunspell versions printed a different string. Does it
> > work if you change the regexp to
> 
> > "\\(?:(but really \\)?Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)?"
> 
> Sadly, it does not. The immediate cause of this error message is that
> regexp for ispell-program-version matches the Hunspell output. Then the
> corresponding check for Ispell version produces this error. The change
> shown below makes the version check pass, but another problem appears:
> 
> | Starting new Ispell process hunspell with ru_RU dictionary...
> | ispell-phaf: No matching entry for ru_RU in 
> ‘ispell-hunspell-dict-paths-alist’.
> |  (ispell-parse-hunspell-affix-file)
> 
> It seems that Hunspell itself does not have any difficulty locating the
> dictionary.
> 
> $ hunspell -a -d ru_RU
> Hunspell 1.4.0
> проверкаа
> & проверкаа 3 0: проверка, проверкам, проверках

What does your Hunspell output when invoked thus:

  $ hunspell -D

It should output all the dictionaries it has available -- that is what
ispell.el expects.  It was a long-standing bug in Hunspell that (some
versions of) it didn't, so I'm guessing that bug is still not fixed.
Look in their bug database for a patch, apply it, rebuild Hunspell,
and it should work (unless my guess is wrong and some other factor is
at work here).

> Below is the change I made to work arround the version check.

Thanks, but I think this part is too drastic:

> -     (if (ispell-check-minver ispell0-minver ispell-program-version)
> -         (or (ispell-check-minver ispell-minver ispell-program-version)
> -             (setq ispell-offset 0))
> -       (error "%s release %s or greater is required"
> -              ispell-program-name
> -              ispell-minver))
> +     (cond ((or (null ispell-program-version)
> +                   (ispell-check-minver ispell-minver 
> ispell-program-version)))
> +              ((ispell-check-minver ispell0-minver ispell-program-version)
> +               (setq ispell-offset 0))
> +              (:else (error "%s release %s or greater is required"
> +                            ispell-program-name
> +                            ispell-minver)))

We cannot give up the test of ispell-program-version.  I suggest to do
this the other way around: if Hunspell reports version 1.4 or greater,
_then_ and only then skip the ispell-program-version test.





reply via email to

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