2

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?

  • This approach looks interesting, but seems to given a strange list of dictionaries. I had just set-up my own dictionaries explicitly as a work around, but would prefer some automatic method in this sort of direction. – Andrew Swann Jan 23 at 11:00
  • @AndrewSwann: do you get several loaded dictionaries or several available dictionaries? ispell-find-hunspell-dictionaries looks for .aff extensions. I have only one .aff file as the loaded dictionary. – antonio Jan 23 at 17:13
  • I have just tried this again it looks better than yesterday. hunspell-dictionary-alist and ispell-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. – Andrew Swann Jan 24 at 10:58
  • I have been using this for sometime now, with the advice-add wrapped in (with-eval-after-load "ispell" ...) and it is working fine. – Andrew Swann Feb 17 at 12:43
  • 1
    If helpful, there's some kind of patch here: github.com/emacs-mirror/emacs/commit/… According to this, the problem is that Hunspell developers changed the output of the program for the flag (hunspell -D). – incandescentman Mar 1 at 21:54

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.