ocaml / merlin

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

Filtering in dropdowns #109

Closed roshanjames closed 10 years ago

roshanjames commented 10 years ago

With the current merlin, if I use auto-complete mode as available through marmalade (which installs itself as auto-complete-1.4) filtering in the dropdown works by hitting C-s. However, I think this is an older version of auto-complete and sometimes the dropdown is badly formatted when there are identifiers that have long types.

Filtering in the dropdown is a useful feature wherein I get to see only the identifiers that match a substring in the dropdown list.

If I were to install auto-complete from melpa (which installs as auto-complete-20130724.1750) the dropown formatting is always good, but filtering using C-s does not work.

I had a quick look at debugging the problem. The filtering functionality itself is provided by popup which is installed by auto-complete, but the part of the code that sets up the key bindings seems to be largely unchanged so I am not sure what causes this issue.

roshanjames commented 10 years ago

Any updates?

lehy commented 10 years ago

I have auto-complete 20130724.1750 (probably from melpa) and Merlin 1.4, and cannot reproduce your issue (C-s works for me, and filters the dropdown). Can you give an .ml file and the steps to reproduce ?

roshanjames commented 10 years ago

C-s does not work for me at all with that version of auto-complete. It's not specific to any particular .ml file. I am on emacs 24.

trefis commented 10 years ago

Wouldn't https://github.com/auto-complete/auto-complete/issues be more appropriate?

lehy commented 10 years ago

I was able to reproduce (probably I had updated my auto-complete but not restarted Emacs).

Setting ac-use-menu-map to t fixed it for me (M-x customize-variable ac-use-menu-map). It seems now off by default, which means that auto-complete does not register its custom key map by when showing the popup.

roshanjames commented 10 years ago

@lehy Thanks. That works.

@def-lkb I am reluctant to do this myself. In the past we have suspected that some bug was an auto-complete issue only to later discover that it wasn't. I'll leave it to you guys to file issues upstream once you can verify that its an issue with auto-complet itself, rather than an issue with merlin's use of auto-complete.

let-def commented 10 years ago

@roshanjames In this case, it really seems to be a change in auto-complete behavior. I'll close the issue now. Btw, thanks @lehy!