Spell Check in Emacs on Mac

1.2k views Asked by At

I am not able to use Spell-Check in the Emacs on my Mac. I copied the .emacs file I had on my previous Fedora to my home folder in my Macbook. The ".emacs" has a line saying:

(global-set-key "\C-k" 'ispell)

When I type "control+k" in an open emacs terminal, I get the following error message in the minibuffer:

Searching for program: permission denied,/Applications/Emacs.app/Contents/Resources/list/textmodes/ispell.elc

When I looked for this address, I found that there is no "list" folder inside the "/Applications/Emacs.app/Contents/Resources/" folder.

When I do "locate ispell.elc", I get the following results:

/Applications/Emacs.app/Contents/Resources/lisp/textmodes/ispell.elc
/usr/local/share/emacs/24.2/lisp/textmodes/ispell.elc
/usr/share/emacs/22.1/lisp/textmodes/ispell.elc

How do I fix it?

1

There are 1 answers

0
Sean Perry On

I have the following in my emacs config:

(defmacro WhenOSX (&rest body)
   `(if (eq system-type 'darwin)
        (progn ,@body)
       nil
     )
 )
(WhenOSX
 (setq ispell-program-name "/usr/local/bin/aspell")
 )

I install aspell via homebrew. The above macro lets me share my config across Linux, OSX, and others.

https://github.com/shaleh/dot-files/tree/master/emacs.d has my Emacs config containing bits I have gathered from around the web over the years. Enjoy.