-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utop in emacs #12
Comments
Can you check that ~/.opam/system/bin is in the PATH of your emacs process? You can use the (insert (replace-regexp-in-string ":" "\n" (getenv "PATH"))) If it is not this means that the environment variables of your emacs are not set correctly in order to use opam. Here is some emacs lisp code that should work, you can put it in your (mapc
(lambda (line)
(when (string-match "\\(.*\\)=\\(.*\\)" line)
(setenv (match-string 1 line) (match-string 2 line))))
(split-string
(shell-command-to-string "opam config -env")
";[ \r\n\t]*")) |
Thanks, everything is ok now. |
The documentation suggests setting |
I needed to use First I tried |
More importantly: I don't see documentation with this suggestion. Could this be added to the https://github.com/diml/utop/blob/master/README.md? |
Sure, I updated the README |
My os is MAC 10.7.5 and emacs version is 24.3.
I add follow line to my emacs config(.emacs):
(load-file "~/.opam/system/share/emacs/site-lisp/utop.el")
(autoload 'utop "utop" "Toplevel for OCaml" t)
(autoload 'utop-setup-ocaml-buffer "utop" "Toplevel for OCaml" t)
(add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer)
(add-hook 'typerex-mode-hook 'utop-setup-ocaml-buffer)
and run utop in emacs , and then output
Process utop exited with code 2
but i run utop in my terminal , everything is ok.
Thanks.
The text was updated successfully, but these errors were encountered: