ispell-init-process fails
When I try to correct a word with ispell, I got the following error:
ispell-init-process: Error: The encoding "nil" is not known. This could also mean that the file "/nix/store/pj0ivrsxk2hik5hv7pdywdxxga0m1wvv-aspell-0.60.8/lib/aspell/nil.cset" could not be opened for reading or does not exist.
I dug into this a bit. ispell-init-process
internally sets variable ispell-library-directory
(setq ispell-library-directory (ispell-check-version)
;; Assign a non-nil value to ispell-process-directory
;; before calling ispell-start-process, since that
;; function needs it to set default-directory when
;; ispell-async-processp is nil.
ispell-process-directory default-directory
ispell-process (ispell-start-process)
ispell-filter nil
ispell-filter-continue nil)
and I confirmed that this is indeed nil
on my Emacs.
I guess this is because (ispell-check-version)
returns nil
. But I don't have a good idea why that happens.
Could someone give me pointers, or any idea why this happens?
The definition of (ispell-check-version) here
Some more info
aspell
exists in the $PATH and Emacs can see it
(executable-find "aspell") => "/nix/store/lzphgp0k1cm7sz27f59jqaa57r13mlc2-aspell-env/bin/aspell"
aspell
version seems correct:
$ aspell -vv
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.8)
- Dictionaries seem available
$ aspell dump dicts
en
...
en_US
...
- I'm using DoomEmacs
doom/version
below:
GNU Emacs v28.2 nil
Doom core v3.0.0-pre HEAD -> master, origin/master, origin/HEAD b66ad7703 2023-03-17 00:33:32 -0400
Doom modules v23.03.0-pre HEAD -> master, origin/master, origin/HEAD b66ad7703 2023-03-17 00:33:32 -0400
ispell-library-directory
is alsonil
and(ispell-check-version)
returnsnil
and yet I don't have any problem checking a word.ispell-library-directory
does not need to be set ifispell-async-processp
is non-nil.(ispell-get-coding-system)
? I gotnil
and am wondering if that's the issue.utf-8
, coming from(assoc ispell-current-dictionary ispell-dictionary-alist)
which returns(nil "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil utf-8)
.