0

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?

Pradeep Kumar Jha
  • 877
  • 4
  • 15
  • 30
  • You have at least two problems -- first, your permissions may need to be fixed -- second you need to install `aspell` (or another equivalent thereof). Or, perhaps you need `aspell` and you just configured the location of the spelling program to incorrectly -- i.e., `ispell.elc` does not contain a dictionary or executable to search the dictionary. You need something like this (after you install `aspell`): `(setq-default ispell-program-name "/Users/HOME/.0.data/.0.emacs/elpa/bin/aspell")` and `(setq ispell-dictionary "english")` and `(setq flyspell-default-dictionary "english")` – lawlist Dec 09 '13 at 03:32
  • 1
    As you may have already surmised, it is `lisp` not `list` -- so your `.emacs` file may have a typo. Feel free to right click on your application and reveal the packaged directories and familiarize yourself with the various directories inside. Also, perhaps start off with a tried and true self-contained Emacs build (i.e., *not* homebrew, *not* macports) -- http://emacsformacosx.com/   You can use macports or homebrew to install `aspell`, or install the developer tools for your Mac and build `aspell`, or there is another equivalent you'll find on Google that is a packaged spelling utility. – lawlist Dec 09 '13 at 03:43

1 Answers1

0

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.

Sean Perry
  • 3,776
  • 1
  • 19
  • 31