help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speck (Spell checker for Emacs)


From: Alexander Shukaev
Subject: Re: Speck (Spell checker for Emacs)
Date: Sat, 18 Apr 2015 22:22:58 +0200

​Alright, I think I've nailed it.  The important bit was to

(setq speck-hunspell-library-directory "")

​
Quite unexpected, isn't it?  The reason is that if you run manually

hunspell -a -d "<absolute-path>/share/hunspell/en_US-large" -B


​it reports error:

Can't open affix or dictionary files for dictionary named "
>
> <absolute-path>/share/hunspell/en_US-large".
>
>

​There are only 2 ways to supply the dictionary properly, either:

​hunspell -a -d "en_US-large" -B​


or

hunspell -a -d "../share/hunspell/en_US-large" -B


I'm not sure whether this is related to MSYS2 Hunspell or applies in
general, but anyway that means we should configure it as follows:

(setq speck-hunspell-library-directory "")


or

(setq speck-hunspell-library-directory "../share/hunspell/")


However, the 2nd variant will not work due to

Setting current directory: permission denied, ../share/hunspell/


As a result, the only variant is

(setq speck-hunspell-library-directory "")


and as soon as I do it, it finally works just fine!

Here is the complete configuration:

(setq speck-engine 'Hunspell
      speck-hunspell-program (executable-find "hunspell")
      speck-hunspell-library-directory
      (if (eq system-type 'windows-nt)
          ""
        (expand-file-name "share/hunspell/"
                          (file-name-directory
                            (directory-file-name
                            (file-name-directory speck-hunspell-program)))))
      speck-hunspell-default-dictionary-name "en"
      speck-hunspell-dictionary-alist '(("en" . "en_US-large"))
      speck-hunspell-language-options '(("en" utf-8 nil nil))
      speck-hunspell-coding-system 'utf-8)


Thanks to Tomas and especially Eli for assistance.  Hope this helps
somebody in future.

Kind regards,
Alexander


reply via email to

[Prev in Thread] Current Thread [Next in Thread]