图阿雷格模式找不到ocaml?

Sil*_*ent 3 emacs ocaml tuareg

我有关于emacs的tuareg模式.我在Mac OS上下载了ocaml 4.01.0并安装了它.

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

Maxs-MacBook-Pro:~ Max$ which ocamlrun
/usr/local/bin/ocamlrun
Run Code Online (Sandbox Code Playgroud)

在tuareg模式下,Cx Cb ocaml返回"正在搜索程序:没有这样的文件或目录,ocaml"

我需要做些什么来让ocaml与tuareg模式一起工作?

谢谢.

Squ*_*dly 6

虽然/usr/local/bin可能$PATH适用于您的shell,但Emacs可能没有为其设置正确的值$PATH

尝试将其添加到.emacs文件中,然后对其进行评估.

(setq exec-path (append exec-path (list "/usr/local/bin")))
Run Code Online (Sandbox Code Playgroud)

  • 我还建议在OSX上使用exec-path-from-shell软件包:https://github.com/purcell/exec-path-from-shell (2认同)