Categories
Emacs Uncategorized

Error Enabling Flyspell Mode

Emacs in Fedora 22 insist on using aspell as its default dictionary. Fedora when installed with locale other than en-US doesn’t seem to install aspell-en. This causes Flyspell mode to give following error.

Error enabling Flyspell mode:
(ispell-phaf: No matching entry for nil.
)

The above error can be fixed by adding following to your ~/.emacs which is taken from Chen Bin‘s spell check set up blog post.

;; find aspell and hunspell automatically
(cond
((executable-find "aspell")
(setq ispell-program-name "aspell")
(setq ispell-extra-args '("--sug-mode=ultra" "--lang=en_US")))
((executable-find "hunspell")
(setq ispell-program-name "hunspell")
(setq ispell-extra-args '("-d en_US")))
)

This doesn’t fully solve our problem. Starting Flyspell mode will give you following error.

Error enabling Flyspell mode:
(Error: No word lists can be found for the language "en_US".)

To resolve this issue you can install aspell-en.x86_64 as follows.

sudo dnf install aspell-en.x86_64