Emacs cannot find flyspell/ispell

TakeS picture TakeS · Jun 15, 2013 · Viewed 15.1k times · Source

On my Mac (Snow Leopard, 10.6.8), I'm using a modified version of Emacs 24.2 provided here to utilize Emacs Speaks Statistics (ESS) from the downloads page. Emacs works, but I haven't yet been able to get a spell checker to work.

To rectify this, I'm following the instructions from this page to download flyspell. I copied the flyspell.el file into my /Applications/Emacs.app/Contents/Resources/site-lisp directory, which is apparently the directory of my emacs load path (note that, for instance, the auctex.el file is located in that directory).

Then, I modified my .emacs file by adding:

(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(autoload 'flyspell-delay-command "flyspell" "Delay on command." t)
(autoload 'tex-mode-flyspell-verify "flyspell" "" t)
(add-hook 'LaTeX-mode-hook 'turn-on-flyspell)

When I open a .tex file, and use M-x flyspell-mode, I can "auto-complete" it (i.e. by pressing tab it gives me the correct flyspell options) but when I press RET I get:

Searching for program: no such file or directory, ispell

None of the solutions posed in this question or this question worked, so I'm not sure what the issue is here. Does anyone have ideas or has encountered this problem before?

Answer

lunaryorn picture lunaryorn · Jun 15, 2013

Please, please read the documentation provided by Emacs itself before trying arbitrary instructions from random websites.

Emacs 24.2 includes Flyspell. You must not explicitly install it. If you do so, undo this, that is, delete flyspell.el from /Applications/Emacs.app/Contents/Resources/site-lisp. At best, delete /Applications/Emacs.app completely, and re-install it, to start from scratch.

However, Flyspell needs a spell checking tool, which is not included in Emacs. The error message tells you that you have no such tool installed.

You need to install the ASpell spell checker. You can install it with homebrew with brew install aspell.