Strange behaviour with gtags.el when using vertico #591
-
|
I recently enabled vertico (+ orderless, consult) in my emacs configuration following the suggestions from the README.org. Since then I am seeing strange interaction with gtags.el which I use for code navigation. gtags.el is part of Gnu Global a source code cross-referencing utility similar to ctags, etags, etc. Now looking for tag using gtags-find-tag (via M-.) takes a really long time and if I wait to see the result, it shows completions which seem to be a list of all possible combinations of the alphabet. See attached picture.
Things I have tried so far -
Has anybody seem something similar? Also let me know if you have any suggestions for debugging. Configuration snippets for both vertico and gtags below |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi, I am not familiar with gtags. The issue is likely not due to Vertico, since Vertico only displays the completion candidates provided by the completion table. Check the default completion UI for comparison. |
Beta Was this translation helpful? Give feedback.


Apologies for the delay in getting back. I spent sometime staring at the code and tracing it with the debugger.
Thanks to your hint, I think I understand the problem.
Below is the screenshot when vertico is not enabled.
The key point in the non-vertico scenario I was missing is that the completions are not requested by default. When vertico is enabled, completions are requested before the minibuffer is shown.
The project I was looking at is quite big (~3.6M symbols). This size causes long delay in gtags.el to return the list. And sorting (in vertico) probably adds some overhead too.
There are two options going forward -