Here I am on a GNU/Linux machine.

I have installed hunspell 1.7.0-3 and hunspell-es_MX and a lot of the english dictionaries as well. If I type

hunspell -D

I get, along others:


And if i check the files I can see that I have a aff file in the mentioned directory. In my .emacs file I have:

;; Tell ispell-mode to use hunspell.

(setq ispell-local-dictionary "es_MX")
(setq ispell-local-dictionary-alist
     '(("es_MX" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil utf-8)))

as I saw in other questions here.

But If i run the spell checker it fails, printing:

Can't find Hunspell dictionary with a .aff affix file

I am completely lost here.

More info: My Emacs is 27.2 and the output of the command pointed by rplium, hunspell -D -a /dev/null, is:

AVAILABLE DICTIONARIES (path is not mandatory for -d option):
Can't open affix or dictionary files for dictionary named "es_ES"
  • 1
    Telling us the version of Emacs helps. What does hunspell -D -a /dev/null output?
    – rpluim
    Commented Mar 31, 2022 at 8:05
  • Ok. Last line seems to be pointing to something important.
    – wpkzz
    Commented Mar 31, 2022 at 16:24
  • OK, looks like your default hunspell dictionary is set to 'es_ES', which is not installed. See if DICTIONARY=es_MX hunspell -D -a /dev/null lists a .aff file (and if so, see if you can change the default dictionary for hunspell to be "es_MX")
    – rpluim
    Commented Mar 31, 2022 at 17:30

1 Answer 1


Ok. It has to do with something that is not obvious and is not easily found online or on the hunspell entry in the Emacs documentation. The es_MX dictionary (Mexican Spanish) is only a complement of the es_ES or es_any dictionaries, that act as the base. So I needed to put one of these for the es_MX to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.