ocaml / merlin

Context sensitive completion for OCaml in Vim and Emacs
https://ocaml.github.io/merlin/
MIT License
1.59k stars 233 forks source link

RFC: by default, locate ocamlmerlin relative to merlin.el #115

Open lehy opened 11 years ago

lehy commented 11 years ago

Currently, merlin-command defaults to "ocamlmerlin".

This assumes that ocamlmerlin is in the PATH, which can be complicated (depending on the environment seen by your Emacs). Also, this may risk running an ocamlmerlin of a different version than the merlin.el loaded in your Emacs. The result is that we advise the user to change this variable in her .emacs.

I propose to make it default to nil, and in this case, find ocamlmerlin like so:

(path to loaded merlin.el)/../../bin

This should work without customization in most cases (Opam, global install, local install (as long as the user did not mess too much with SHARE_DIR and BIN_DIR)).

I can propose a patch if that is considered a good idea.

trefis commented 11 years ago

I think something similar has been commited on the vim plugin by Marc Weber, could you have a look at the discussion on https://github.com/def-lkb/merlin/pull/48 and tell me if you think it would make sense for emacs too?

If you do, a patch is of course welcomed.

lehy commented 11 years ago

Yes, I think something like that (#48) would be great; I will have a try at it.