Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autocompletion from the keyboard in Emacs CEDET/semantic

Looking a the different methods for completion in CEDET semantic (fresh version from the Bazaar repository), I see I have the following options (keyboard bindings as suggested by Alex Ott in his config file)

  • C-c ? (semantic-ia-complete-symbol)
  • C-return (semantic-ia-complete-symbol-menu)
  • C-c , l (semantic-analyze-possible-completions)

However, none of them seem to give me the option to choose between the possible completions conveniently using the keyboard.

For example, (semantic-ia-complete-symbol-menu) opens a menu where I can choose between the different options, but as far as I can tell it requires me to use the mouse (I tried C-n, C-p, M-n, M-p to navigate the menu with no success).

On the other hand (semantic-ia-complete-symbol) opens another buffer with the options. I can also use the mouse to choose the desired autocompletion, but I would like to use the keyboard instead.

Also, in previous versions of CEDET, there was a variable (semantic-complete-inline-analyzer-displayor-class) that allowed me to choose between several options for autocompletion (e.g. (semantic-displayor-ghost), or a more elegant overlay as a tooltip), but this variable does not seem to exist anymore.

In case it matters, I work mostly with C++ files.

Update:

The only method that seems to allow me to cycle through autocompletions is C-c , space (semantic-complete-analyze-inline), where I can use TAB to autocomplete, but it doesn't show a menu of possible autocompletions that I can choose from.

like image 440
Amelio Vazquez-Reina Avatar asked Nov 13 '22 20:11

Amelio Vazquez-Reina


1 Answers

In new versions of CEDET it's recommended to use auto-complete or similar packages. You can add ac-semantic to ac-sources, and then auto-complete will use Semantic as source of data for completions. The new version of Emacs/CEDET articles, mentions this setup & shows necessary code. Please try it

like image 165
Alex Ott Avatar answered Nov 15 '22 13:11

Alex Ott