Discussion:
merlin autocomplete : "int" at the end of the line
Vu~ Ngo.c San
2014-10-18 07:46:50 UTC
Permalink
Hello

I'm trying the combination tuareg+merlin+ocp-indent to work nicely in my
emacs. I'm puzzled by this behavior:
suppose you end your line with "in" (which is quite common, right ?) and
then type "return":
The "in" has been autocompleted to "int".

This can't be a default behavior; what do I do wrong ?
Following
https://github.com/realworldocaml/book/wiki/Installation-Instructions,
have in my .emacs:
(setq merlin-use-auto-complete-mode t)

regards
San
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Frédéric Bour
2014-10-18 08:52:12 UTC
Permalink
That's just auto-complete default behavior, which you can customize (
http://cx4a.org/software/auto-complete/ ).

The current beta of merlin (which you have if you are using 4.02 on
opam) allows you to (setq merlin-use-auto-complete 'easy) to override
defaults.
See
https://github.com/the-lambda-church/merlin/blob/a015e9aaca6ce997a835c152051d0611885c38dd/emacs/merlin.el#L1918
for the corresponding settings.
Post by Vu~ Ngo.c San
Hello
I'm trying the combination tuareg+merlin+ocp-indent to work nicely in
suppose you end your line with "in" (which is quite common, right ?)
The "in" has been autocompleted to "int".
This can't be a default behavior; what do I do wrong ?
Following
https://github.com/realworldocaml/book/wiki/Installation-Instructions,
(setq merlin-use-auto-complete-mode t)
regards
San
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Vu~ Ngo.c San
2014-10-18 09:32:54 UTC
Permalink
I currently use opam with 4.01.0 (= system)

do you suggest to change "return" to some other key for autocompletion ?
I fact I don't mind using "return", except in few cases, and "in" is one
of them. Can one impose such exceptions ?
Post by Frédéric Bour
That's just auto-complete default behavior, which you can customize (
http://cx4a.org/software/auto-complete/ ).
The current beta of merlin (which you have if you are using 4.02 on
opam) allows you to (setq merlin-use-auto-complete 'easy) to override
defaults.
See
https://github.com/the-lambda-church/merlin/blob/a015e9aaca6ce997a835c152051d0611885c38dd/emacs/merlin.el#L1918
for the corresponding settings.
Post by Vu~ Ngo.c San
Hello
I'm trying the combination tuareg+merlin+ocp-indent to work nicely in
suppose you end your line with "in" (which is quite common, right ?)
The "in" has been autocompleted to "int".
This can't be a default behavior; what do I do wrong ?
Following
https://github.com/realworldocaml/book/wiki/Installation-Instructions, have
(setq merlin-use-auto-complete-mode t)
regards
San
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Frédéric Bour
2014-10-19 10:31:29 UTC
Permalink
Try loading this file in emacs http://yawdp.com/~def/merlin-keywords.el
After that, if you (add-to-list 'ac-sources 'merlin-ac-source-keywords)
it will also lists ocaml keywords in completion, so in should take
precedence over int.

If you think this help, we may integrate something similar in next release.
Post by Vu~ Ngo.c San
I currently use opam with 4.01.0 (= system)
do you suggest to change "return" to some other key for autocompletion ?
I fact I don't mind using "return", except in few cases, and "in" is
one of them. Can one impose such exceptions ?
Post by Frédéric Bour
That's just auto-complete default behavior, which you can customize (
http://cx4a.org/software/auto-complete/ ).
The current beta of merlin (which you have if you are using 4.02 on
opam) allows you to (setq merlin-use-auto-complete 'easy) to override
defaults.
See
https://github.com/the-lambda-church/merlin/blob/a015e9aaca6ce997a835c152051d0611885c38dd/emacs/merlin.el#L1918
for the corresponding settings.
Post by Vu~ Ngo.c San
Hello
I'm trying the combination tuareg+merlin+ocp-indent to work nicely
suppose you end your line with "in" (which is quite common, right ?)
The "in" has been autocompleted to "int".
This can't be a default behavior; what do I do wrong ?
Following
https://github.com/realworldocaml/book/wiki/Installation-Instructions,
(setq merlin-use-auto-complete-mode t)
regards
San
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Loading...