9

I just upgraded to Emacs 24 and can't find ispell. If I try to use ispell I get the error message:

Searching for program: no such file or directory, ispell

After a small amount of searching on the Unix & Linux SE, I found that I should put this code in my .emacs file: (setq ispell-program-name "/path/to/ispell"). But I can't figure out what ispell's path is. Can anybody tell me? I'm on Mac OS10.8 and GNU emacs 24.5.1.

7
  • 1
    Were you getting this error before you added (setq ispell-program-name "/path/to/ispell") to your .emacs? If so try removing it. Also, you can try running emacs -Q from the terminal and then M-x ispell RET. For me though, the path to ispell-program is /usr/bin/aspell, but I am on Linux, and it will likely be different on OS X
    – elethan
    Dec 30, 2015 at 20:23
  • On Linux systems ispell is typically an alias for a program with a conforming interface, not necessary the original ispell. Not sure what's going on on Macs, but, quite certainly, you could create an alias for whatever program you run instead, by, say, placing a symlink with the name ispell pointing at it somewhere on the $PATH.
    – wvxvw
    Dec 30, 2015 at 20:39
  • @elethan: Yes, I was getting the error before. I haven't evaluated the elisp command yet, since I don't know what the path to ispell is. I've now looked for ispell and aspell in /usr/bin, /usr/local/bin, and some OSX-specific places. But still no joy.
    – Ruby
    Dec 30, 2015 at 20:41
  • @wvxvw: I haven't begun running a spell program yet. I upgraded to Emacs 24 just yesterday.
    – Ruby
    Dec 30, 2015 at 20:47
  • 1
    No, these are the "glue" code for Emacs to be able to use the actual spell checker program. They don't do the spell checking. I believe that if you use Homebrew or another package manager, you should be able to install aspell. I'm not 100% sure, but I think that Open Office (and Libre Office too) come with hunspell.
    – wvxvw
    Dec 30, 2015 at 21:21

1 Answer 1

16

This isn't an Emacs problem. You need to have the ispell program installed on your machine. ispell is available on homebrew, so you can do:

$ brew install ispell

That's probably all you need. If Emacs can't find ispell after you've installed it:

$ which ispell

will tell you the path to the ispell executable.

Alternatively, aspell and hunspell are compatible and can be used instead.

2
  • @WilfridHughes: I found aspell on my machine and assigned it to the variable ispell-program-name. But I still don't have ispell working. I now get the error message: Error: No word lists can be found for the language "en-US". WARNING: Unable to enter Nroff mode: Unknown mode: "nroff". I still have an old version of Emacs (22) for which ispell is working fine, with tons of different languages, so I know that the relevant files are somewhere on my machine. But I don't know what to do next!
    – Ruby
    Dec 31, 2015 at 19:16
  • @WilfridHughes: ^^^ I neglected to clarify that I'm talking about Emacs 24, which I've just updated to. I kept the old Emacs (22) in case of situations like this one.
    – Ruby
    Dec 31, 2015 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.