I am unable to use Ispell, after the upgrade to Hunspell 1.7.0.
It seems that the "-D" option does not return the loaded dictionary, therefore the function ispell-find-hunspell-dictionaries
fails. Calling a fake file (null device) seems to return the proper values. I am using therefore this workaround:
;; Work around for Hunspell 1.7.0
(defun manage-hunspell-1.7 (old-function-ispell &rest arguments)
"Add null-device when calling \"hunspell -D\"."
(if (equal "-D" (nth 4 arguments))
(funcall old-function-ispell "hunspell" null-device t nil "-D" null-device)
(apply old-function-ispell arguments)))
(advice-add 'ispell-call-process :around #'manage-hunspell-1.7))
What is the official way to use Hunspell 1.7.0?
ispell-find-hunspell-dictionaries
looks for.aff
extensions. I have only one.aff
file as the loaded dictionary.hunspell-dictionary-alist
andispell-local-dictionary-alist' get populated with the correct hunspell dictionaries that I have installed. On the other hand
ispell-dictionary-alist` also gets populated with a large number of further entries - I am not sure where they come from.advice-add
wrapped in(with-eval-after-load "ispell" ...)
and it is working fine.