Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using brew as my package manager for both Emacs and ispell. I have both installed. Doing a quick google, I was unable to figure out how to tell Emacs where ispell is and to load the appropriate dictionaries.

Right now when I do a M-x ispell-check-version, Emacs saucily replies: Searching for program: No such file or directory.

How do I configure Emacs to use ispell?

share|improve this question

1 Answer

The variable you're looking for is ispell-program-name. Stuff this somewhere in your .emacs:

(setq ispell-program-name "/path/to/ispell")

Or use M-x set-variable, etc.

References:

  • From the sources to ispell.el

    (defcustom ispell-program-name
      (or (locate-file "aspell"   exec-path exec-suffixes 'file-executable-p)
          (locate-file "ispell"   exec-path exec-suffixes 'file-executable-p)
          (locate-file "hunspell" exec-path exec-suffixes 'file-executable-p)
          "ispell")
      "Program invoked by \\[ispell-word] and \\[ispell-region] commands."
      :type 'string
      :group 'ispell)
    
  • See also: http://emacswiki.org/emacs/InteractiveSpell

Whenever you can't find an Emacs function, remember C-h f (or a variable: C-h v). Entering ispell at the Describe function prompt tells you that ispell is an interactive compiled Lisp function in 'ispell.el'., and from there you can usually find what you're looking for.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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