Subject: Re: bug#79477: Emacs Emacs 31.0.50: ispell-tests.el: "Can't find Hunspell dictionary with a \.aff affix file"

From: Alan Mackenzie <[email-masked]>
Date: Sat, 20 Sep 2025 16:12:22 +0000

Hello, Eli.

Thanks for such a quick reply!

On Sat, Sep 20, 2025 at 17:20:12 +0300, Eli Zaretskii wrote:
> > Date: Sat, 20 Sep 2025 13:52:58 +0000
> > From: Alan Mackenzie <[email-masked]>

> > Hello, Emacs.

> > When I run the test suite with make check, I get 25 successes in
> > test/lisp/textmode/ispell-tests/ispell-tests.log.  Each of these has the
> > same error message, "Can't find Hunspell dictionary with a .aff affix
> > file".

> > I don't know what a .aff file is, but it seems like my setup is missing
> > one.  Despite this, surely ispell-tests.el should cope with this
> > deficiency, rather than emitting 25 error messages.

> Are you saying that you have the Hunspell executable, but not its
> dictionaries?

Yes, that is indeed the case.  The Hunspell installation script on Gentoo
installs the dictionaries it is specifically asked to install, and if
none are requested, none are installed.  No sensible default is used.
This may be a Gentoo bug.

> What happens if you invoke Hunspell from the shell prompt -- does it
> work or does it show some error message?

I get the error message:

    Can't open affix or dictionary files for dictionary named "en_GB".

..

> If your Hunspell installation is workable, you should have a
> /usr/share/hunspell directory with *.aff files.  If they are missing,
> either install them or remove the Hunspell executable.  The Emacs test
> suite is not supposed to cope with installations that don't work, so
> showing error messages is OK in that case.

I have what is arguably a valid installation, even though not useful.  I
tried reinstalling it, and got no warning message about the lack of
languages.

After deinstalling hunspell ...., I get a different message in
ispell-tests.log:

    (error "No Ispell process to read output from!")

, but I suspect that will go away as soon as I reboot.

> If all of the above doesn't resolve your problem, please show the
> exact error messages, with everything else that the test displays
> (which you should have done in the first place, of course).

Maybe later, after I've rebooted.

> FWIW, I've just tried renaming the Hunspell executable, and the test
> suite correctly skipped the relevant ispell tests.  So if Hunspell is
> not installed, I don't expect any error messages.

OK, thanks.

-- 
Alan Mackenzie (Nuremberg, Germany).