5

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.

Community
  • 1
  • 1
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
  • 1
    One you may wish to take a look at auto-complete + gtags/clang. It has some rough edges currently, if you want to use the absolute latest version 1.4 from git, but it does what you ask here for out of the box. As for the question, try describing some keymaps, maybe you need to use C-n/C-p for navigating in menu instead of cursor keys (try also M-n/M-p). – Piotr Kalinowski Oct 18 '12 at 19:40

1 Answers1

1

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

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
  • I have configured auto-complete to work with CEDET, but it doesn't provide as much information as 'semantic-ia-complete-symbol' (ie, number of arguments a member function takes, etc). Also, auto-complete's menu opens any time it finds something it can complete, not just for parsed class objects like CEDET. It is very annoying when trying to down arrow through a file after declaring something and instead of the cursor moving, auto-complete pops up. I have tried many things to resolve both of these issues with no luck. Until I can figure these out, I am in the same situation as the OP. – SullX Jul 18 '13 at 22:42
  • 1
    For C/C++ modes I'm using the auto-complete with manual invocation (`ac-auto-start` equals to `nil`). Regarding the first part of comment - I think, that it may possible to extend `ac-semantic` to get more information from Semantic and expose it as documentation - `ac-mode` has corresponding functionality, but not all sources implement it... – Alex Ott Jul 20 '13 at 07:04