2

I am trying to configure Hunspell in my emacs running in windows. When I type M-x ispell-buffer, I get the following error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("," nil 0)
  split-string(nil "," t)
  ispell-parse-hunspell-affix-file(nil)
  ispell-find-hunspell-dictionaries()
  ispell-set-spellchecker-params()
  ispell-region(1 25)
  ispell-buffer()
  funcall-interactively(ispell-buffer)
  call-interactively(ispell-buffer record nil)
  command-execute(ispell-buffer record)
  execute-extended-command(nil "ispell-buffer" "ispell-bu")
  funcall-interactively(execute-extended-command nil "ispell-buffer" "ispell-bu")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

My .emacs file looks like this:

(setq exec-path (append exec-path '("D:/programs/emacs/hunspell/bin/")))

(setq ispell-program-name "hunspell")
;; below two lines reset the the hunspell to it STOPS querying locale!
(setq ispell-local-dictionary "en_US")
;; "en_US" is key to lookup in `ispell-local-dictionary-alist`
(setq ispell-local-dictionary-alist
      '(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']"
     nil ("-d" "en_US") nil utf-8)))

1 Answer 1

1

See Hunspell flyspell and Emacs on windows

Please figure out the version of hunspell you use. It supports either Windows style path or Unix style path but not both. Then setup environment variable DICTPATH properly.

1
  • Yes. I did it. I added the DICPATH varible in my .emacs file. Thanks. It's working now. Jul 18, 2017 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.