Are there any other ways to make ocaml support auto-complete, etc. except using rlwrap ?
Sincerely!
Fairly recently a system named utop was announced on the OCaml mailing list. It's a replacement for the OCaml top level with many advanced features. It appears to be hosted at OcamlCore.org:
http://forge.ocamlcore.org/projects/utop/
I haven't tried it, but it sounds great.
I use rlwrap, myself.
You may use the ocaml toplevel from inside an Emacs buffer, which gets you solid rlwrap
-like editing features, plus anything you have in your Emacs config, including potential non-ocaml-specific completion modes.
Besides Jérémie Dimino's utop that Jeffrey already cited, there are other, older projects relative to the OCaml toplevel. They're not all providing completion, but you may still be interested in them:
(Related, but not toplevel-oriented, is Jun Furuse's Ocamlspotter that allows to get precise where-was-this-name-defined information for OCaml files in Emacs)
All those projects come as patches to the OCaml sources. This means that to install them, you must download the sources of the OCaml compiler, patch them, compile, and use the result as your OCaml install (it may be optionally possible to keep an existing OCaml install, patch and compile the same version of the compiler separately, and selectively use/replace the interesting executables). This also means that there is a maintenance burden on the patch developper, which has to follow OCaml compiler upgrades, and that you may be constrained in which versions of OCaml to use. In a nutshell, there are not easy to deploy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With