Closed roshanjames closed 11 years ago
My (naïve) guess here is that auto-complete might have a fallback completion list (like, "all the words present in the buffer with the given prefix") when its principal completion function (i.e. merlin) fails to return any suggestion.
completion-at-point
having no such mechanism, it would explain why sometimes it doesn't offers anything while auto-complete-mode does.
One good way to check that is : if auto-complete-mode doesn't display any type along its completion propositions, then he is probably using such a fallback.
I'll let @asmanur confirm whether my guess is correct or not (or I will try to check that behavior tomorrow).
Yes you are right. By default ac-complete-mode also uses
"words-in-the-same-buffer" or so source, which completion-at-point does
not. Moreover there is an history. For instance if you have already
completed "Module.function", and you type "Mod
Anyway, the queries sent by emacs with the two modes are exactly the same. However the code is not so modular at the moment in master.
On jeu. 15/août 2013 (18:05), Thomas Refis wrote:
My (naïve) guess here is that auto-complete might have a fallback completion list (like, "all the words present in the buffer with the given prefix") when its principal completion function (i.e. merlin) fails to return any suggestion.
completion-at-point
having no such mechanism, it would explain why sometimes it doesn't offers anything while auto-complete-mode does.One good way to check that is : if auto-complete-mode doesn't display any type along its completion propositions, then he is probably using such a fallback.
I'll let @asmanur confirm whether my guess is correct or not (or I will try to check that behavior tomorrow).
Reply to this email directly or view it on GitHub: https://github.com/def-lkb/merlin/issues/57#issuecomment-22741870
The issue I had in mind here is where auto-complete-mode displayed merlin output (with types in a dropdown) while completion-at-point did not show merlin data.
We suspected that this might be because both modes were sending different queries to merlin. We enabled MERLIN_LOG to look at the difference between the queries. I am not sure I can interpret the log output very well, but it seemed like both modes differed in what column number they were sending to merlin. The line number seemed right. That said, I am not sure.
This goes back to the point I was making elsewhere that merlin should probably have somewhat richer output in the debug log. Maybe the output can be terse by default, but when we send it a command it can subsequently turn on verbose debug information. That way I will be able to include these log snippets when filing issues and you guys will have a better sense of what happens in the case of errors like this that are hard to reproduce.
There has been several changes on the emacs mode since the last message on this thread, and I believe you won't be able to reproduce now. So I'll close but feel free to reopen if the problem persisted for you.
Often auto-complete provided by the auto-complete-mode and completion-at-point (which I think ships with emacs) behave differently. i.e. one refuses to show completion results while the other does.
It is unclear why this and is hard to reproduce. One possibility is that this maybe do the fact that different modes are sending different queries to merlin. It would be good to have debug information displayed such that one can understand why completion-at-point and auto-complete behave differently.
This sort of information might also help towards building a better auto-complete mode one day that is more customized for merlin.