Search code examples
emacsocamltuareg

Tuareg-mode can't find ocaml?


I have tuareg-mode working on emacs. I downloaded ocaml 4.01.0 on my Mac OS and installed it.

Maxs-MacBook-Pro:~ Max$ ocaml
        OCaml version 4.01.0

Maxs-MacBook-Pro:~ Max$ which ocamlrun
/usr/local/bin/ocamlrun

When in tuareg-mode, C-x C-b ocaml returns "Searching for program: No such file or directory, ocaml"

What do I need to do to get ocaml to work with tuareg-mode?

Thanks.


Solution

  • Although /usr/local/bin may be in $PATH for your shell, Emacs may not have the correct value set for $PATH

    Try adding this to your .emacs file, and then evaluating it .

    (setq exec-path (append exec-path (list "/usr/local/bin")))