I have update to macOS Sierra after witch spelling in Emacs is broken. The error I get is (ispell-phaf: No matching entry for en_GB in ´ispell-hunspell-dict-paths-alist´)

I have both install aspell and hunspell via homebrew, I have the following content in my ~/Library/Spelling folder:

├── dynamic-counts.dat
├── dynamic-text.dat
├── en_AU.aff
├── en_AU.dic
├── en_CA.aff
├── en_CA.dic
├── en_GB.aff
├── en_GB.dic
├── en_US.aff
├── en_US.dic
├── en_ZA.aff
├── en_ZA.dic
├── hyph_en_GB.dic
└── hyph_en_US.dic

And I have the following in my .emacs file:

;;; Set dictonary
(setenv "DICTIONARY" "en_GB")
;;; For loading hunspell insteand of ispell
(setq ispell-local-dictionary "en_GB")
(when (executable-find "hunspell")
 (setq-default ispell-program-name "hunspell")
 (setq ispell-really-hunspell t))

Does someone have an idea as to what is wrong. This worked under MacOS El Capitan and therefore I find it strange that it suddenly does not.

EDIT: Result of hunspell -D

hunspell -D
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
Hunspell 1.5.4
  • I'm not on MacOS, but you could try hunspell -D at a prompt to see if hunspell finds the files. Otherwise try to set the env. variable DICPATH directing to ~/Library/Spelling and try it then. Dec 6 '16 at 13:19
  • @ArashEsbati I have added the output from hunspell -D to the post and that seems a bit strange to me Dec 6 '16 at 13:22
  • 3
    You see the search path compiled in your binary beneath SEARCH PATH: and ~/Library/Spelling is not there. It means that hunspell does not find the files either. Set the environment variable DICPATH to ~/Library/Spelling and try again. Or you move the files into a directory mentioned in that path, e.g. /Users/larsnielsen/.openoffice.org/3/user/wordbook. Dec 6 '16 at 13:27
  • @ArashEsbati I did this export DICPATH=$DICPATH:/Users/larsnielsen/Library/Spelling in .bash_profile and that added the path as it should. However I get the same error :/ Dec 6 '16 at 13:39
  • 1
    If you're running Emacs graphically it doesn't pick up exports from your .bash_profile as it doesn't go anywhere near the shell, so I'd suggest trying to run hunspell -D from within Emacs, eg. with M-!.
    – Alan Third
    Dec 7 '16 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.