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)))
Drew
  • 75,699
  • 9
  • 109
  • 225
Sreekumar R
  • 143
  • 1
  • 11

1 Answers1

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.

chen bin
  • 4,781
  • 18
  • 36