Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I specify a custom path to the annotation files in tuareg-mode emacs?

Is there anyway to specify the path to the annot files when using tuareg-mode in emacs? I am trying to find out the type for my functions and the mode complains with "not annotation file".

My build structure is:

lib 
 obj
  *.o
  *.cmi
  *.cmx
  *.annot
 src
  *.ml
  *.mli
like image 513
Calin Avatar asked Nov 06 '22 02:11

Calin


1 Answers

I don't think you can easily configure this: have a look at the caml-types-locate-type-file function in the caml-types.el file in your ocaml installation.

This is the function that searches for .annot files. You can probably edit it to replace the "_build" (which is where ocamlbuild puts the generated files) with obj and be done with that.

A much better option is to define a variable in your .emacs.el, and use it in the caml-types.el file. this way, you could even propose the patch to the ocaml people.

like image 158
tonio Avatar answered Nov 09 '22 09:11

tonio