>>> langrind@... seems to think that:
>I have a class defined in a header file, and the name of the header is the same as the name of the class - e.g. class Foo is defined in Foo.h.
>If I am in some other file, and I have a declaration:
> Foo foo;
>And I place the mark at Foo, the class is shown below the mode line, so semantic knows the tag.
>I invoke semantic-complete-jump, and type Foo<return> and the minibuffer says "[Not Unique]"
>If I then type a space, the string in the minibuffer is partially completed, such that it says:
>If I type another space, it further completes to
>Thus it is possible to visit the lines that say "#include <Foo.h>", which is a pretty neat feature, but it is not possible to visit the class definition of Foo.
>Is there a function that behaves just like semantic-complete-jump, but without the completion feature? Or is there some other way to deal with this problem.
The jump routine you used (C-c , J) will jump to remote files as you
expect, but it includes matching header files and the like. It only
knows about files you have visited, so if you haven't visited Foo.c,
it may not know about it.
Also, SPC will complete over word boundaries ("." "_" etc) and since
Foo.h and Foo are similar, SPC will add the ., but TAB will show
The purpose of the completion is to differentiate between multiple
symbols with the same name, such as a prototype, and the actual
definition. Pressing TAB will first show you the list of all
possible symbols (use TAB instead of SPACE for some operations.)
Hitting tab multiple times will highlight the definition you could
jump to, thus it could be that:
C-c , J FOO TAB
% shows list
% highlight foo.h
% hilight Foo in header file
% hilight Foo in C file
% go there
Placing the cursor on the symbol "Foo" in your buffer should also
offer up a default, but that has proven unreliable in the past.
Lastly, if your files are in different directories, you neet to set
up the variable `semanticdb-project-roots'.
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org