I'm running Emacs on MacOS and I installed aspell and its English dictionaries through nix. When I open a file, flyspell throws the following error.
Error enabling Flyspell mode:
(Error: No word lists can be found for the language "en_US".)
When I set ispell-change-dictionary
to english and then try to re-enable flyspell mode, flyspell throws this error message instead:
Error enabling Flyspell mode:
(Error: The file "/nix/store/my1hch4x12i5n1ffhlwpb6bpsiajbv3j-aspell-0.60.6.1/lib/aspell/english" can not be opened for reading.)
I don't know if this is actually the problem, but the above suggests to me that in both cases flyspell is not looking in the correct directory for dictionaries, which for nix should be /nix/store/<hash>-aspell-dict-en-<version>/lib/aspell
. Would anyone know how I get ispell to look in the right directory?
If it's relevant, running aspell dump dicts
from my shell lists all the dictionaries I have installed, but the output of aspell config
makes no mention my nix store's aspell-dict-en
directory.
edit: here are the requested variable values:
ispell-program-name == "aspell"
ispell-aspell-data-dir == nil
ispell-dictionary == nil
ispell-local-dictionary == nil
ispell-dictionary-alist == ((nil "[[:alpha:]]" "[^[:alpha:]]" "[']" nil
("-B")
nil utf-8)
("american" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil
("-B")
nil utf-8)
("brasileiro" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil utf-8)
("british" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil
("-B")
nil utf-8)
("castellano" "[[:alpha:]]" "[^[:alpha:]]" "[-]" nil
("-B")
"~tex" utf-8)
("castellano8" "[[:alpha:]]" "[^[:alpha:]]" "[-]" nil
("-B" "-d" "castellano")
"~latin1" utf-8)
("czech" "[[:alpha:]]" "[^[:alpha:]]" "" nil
("-B")
nil utf-8)
("dansk" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil
("-C")
nil utf-8)
("deutsch" "[[:alpha:]]" "[^[:alpha:]]" "[']" t
("-C")
"~tex" utf-8)
("deutsch8" "[[:alpha:]]" "[^[:alpha:]]" "[']" t
("-C" "-d" "deutsch")
"~latin1" utf-8)
("english" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil
("-B")
nil utf-8)
("esperanto" "[[:alpha:]]" "[^[:alpha:]]" "[-']" t
("-C")
"~latin3" utf-8)
("esperanto-tex" "[[:alpha:]]" "[^[:alpha:]]" "[-'`\"]" t
("-C" "-d" "esperanto")
"~tex" utf-8)
("finnish" "[[:alpha:]]" "[^[:alpha:]]" "[:]" nil
("-C")
"~list" utf-8)
("francais7" "[[:alpha:]]" "[^[:alpha:]]" "[`'^-]" t nil nil utf-8)
("francais" "[[:alpha:]]" "[^[:alpha:]]" "[-'.@]" t nil "~list" utf-8)
("francais-tex" "[[:alpha:]]" "[^[:alpha:]]" "[-'^`\".@]" t nil "~tex" utf-8)
("german" "[[:alpha:]]" "[^[:alpha:]]" "[']" t
("-C")
"~tex" utf-8)
("german8" "[[:alpha:]]" "[^[:alpha:]]" "[']" t
("-C" "-d" "german")
"~latin1" utf-8)
("italiano" "[[:alpha:]]" "[^[:alpha:]]" "[-.]" nil
("-B" "-d" "italian")
"~tex" utf-8)
("nederlands" "[[:alpha:]]" "[^[:alpha:]]" "[']" t
("-C")
nil utf-8)
("nederlands8" "[[:alpha:]]" "[^[:alpha:]]" "[']" t
("-C")
nil utf-8)
("norsk" "[[:alpha:]]" "[^[:alpha:]]" "[\"]" nil nil "~list" utf-8)
("norsk7-tex" "[[:alpha:]]" "[^[:alpha:]]" "[\"]" nil
("-d" "norsk")
"~plaintex" utf-8)
("polish" "[[:alpha:]]" "[^[:alpha:]]" "[.]" nil nil nil utf-8)
("portugues" "[[:alpha:]]" "[^[:alpha:]]" "[']" t
("-C")
"~latin1" utf-8)
("russian" "[[:alpha:]]" "[^[:alpha:]]" "" nil nil nil utf-8)
("russianw" "[[:alpha:]]" "[^[:alpha:]]" "" nil nil nil utf-8)
("slovak" "[[:alpha:]]" "[^[:alpha:]]" "" nil
("-B")
nil utf-8)
("slovenian" "[[:alpha:]]" "[^[:alpha:]]" "" nil
("-B" "-d" "slovenian")
nil utf-8)
("svenska" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil
("-C")
"~list" utf-8)
("hebrew" "[[:alpha:]]" "[^[:alpha:]]" "" nil
("-B")
nil utf-8))
And the output of aspell dump dicts | grep en_US
is:
en_US
en_US-variant_0
en_US-variant_1
en_US-w_accents
en_US-wo_accents
ispell-program-name
,ispell-aspell-data-dir
,ispell-dictionary-alist
,ispell-dictionary
,ispell-local-dictionary
and, what's the output ofaspell dump dicts | grep en_US
?