0

Trying to use Flyspell with LaTeX files. Setup looks like this:

(require 'ispell)
(setq ispell-program-name "/usr/local/bin/hunspell") ;; From Homebrew, version 1.4.1
(add-to-list 'ispell-local-dictionary-alist '("de_DE_OLDSPELL" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "de_DE_OLDSPELL") nil iso-8859-1))
(setq ispell-dictionary "de_DE_OLDSPELL")
(add-hook 'text-mode-hook 'turn-on-flyspell)

Won't load automatically when opening a text (or LaTeX) file, but works fine when loaded manually. How to get Flyspell to load automatically? Probably a simple answer, but I've been going in circles for a while with this.

asked Jun 21, 2016 at 1:38

1 Answer 1

0

Apparently, this is a known problem in interactions between Hunspell and Emacs 24.4+. If Hunspell does not have a dictionary available that corresponds to the value of LANG in Emacs, the autoconfigure will fail. So, set DICTIONARY to the base file name of a dictionary that is available. Hunspell usually insists on an English dictionary, so (setenv DICTIONARY "en_US") or the like should do the trick. That particular bit of code worked for me.

answered Jun 21, 2016 at 2:04
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.