4

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
SEARCH PATH:
.:::/Users/larsnielsen/Library/Spelling:/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/Users/larsnielsen/.openoffice.org/3/user/wordbook:.openoffice.org2/user/wordbook:.openoffice.org2.0/user/wordbook:Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/Users/larsnielsen/Library/Spelling/default
/Users/larsnielsen/Library/Spelling/en_AU
/Users/larsnielsen/Library/Spelling/en_CA
/Users/larsnielsen/Library/Spelling/en_GB
/Users/larsnielsen/Library/Spelling/en_US
/Users/larsnielsen/Library/Spelling/en_ZA
/Users/larsnielsen/Library/Spelling/hyph_en_GB
/Users/larsnielsen/Library/Spelling/hyph_en_US
Library/Spelling/default
Library/Spelling/en_AU
Library/Spelling/en_CA
Library/Spelling/en_GB
Library/Spelling/en_US
Library/Spelling/en_ZA
Library/Spelling/hyph_en_GB
Library/Spelling/hyph_en_US
LOADED DICTIONARY:
/Users/larsnielsen/Library/Spelling/default.aff
/Users/larsnielsen/Library/Spelling/default.dic
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. – Arash Esbati 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 – Lars Nielsen Dec 6 '16 at 13:22
  • 2
    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. – Arash Esbati 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 :/ – Lars Nielsen 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.