I try to install merlin by typing "opam install merlin" in the terminal. After the installation is done, I am asked to do this, but it doesn't seem to work. The github instruction seems to be different
(load "/Users/yxchng/.opam/system/share/emacs/site-lisp/tuareg-site-file") (add-to-list 'load-path "/Users/yxchng/.opam/system/share/emacs/site-lisp") (require 'ocp-indent) ;; Add opam emacs directory to the load-path (setq opam-share (substring (shell-command-to-string "opam config var share 2> /dev/null") 0 -1)) (add-to-list 'load-path (concat opam-share "/emacs/site-lisp")) ;; Load merlin-mode (require 'merlin) ;; Start merlin on ocaml files (add-hook 'tuareg-mode-hook 'merlin-mode t) (add-hook 'caml-mode-hook 'merlin-mode t) ;; Enable auto-complete (setq merlin-use-auto-complete-mode 'easy) ;; Use opam switch to lookup ocamlmerlin binary (setq merlin-command 'opam)
I added this code to .emacs but it doesn't seem to work
it gives me spurious error and says
/usr/local/Cellar/emacs/24.5/Emacs.app/Contents/MacOS/Emacs: \ /bin/bash: opam: command not found/ocamlmerlin: No such file or directory
(linebreak added to prevent scrolling)
The error is like this
How should I solve this problem?