Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs, Cedet and semantic

I've configured CEDET for emacs following Alex article (great!!). Now, the questions:

  1. I've generated GTAGS with Gnu Global in my /usr/include, how can i check if semantic is using GTAGS?
  2. Can I keep my GTAGS in another directory and instruct semantic to use that dir?
  3. In C/C++ sources, completion on include statement (from system headers) doesn't list all available headers. Ok, this is a stupid problem.. but makes me think something is not working right
like image 437
synasius Avatar asked Apr 08 '10 14:04

synasius


1 Answers

You can use the command:

M-x semantic-c-describe-environment RET

to find out about your include path and CPP macro settings.

To test GNU Global use, you can use:

M-x semanticdb-test-gnu-global RET printf RET

to search for "printf" in in some project. Since your project (perhaps in /home/you/myproject) does not have printf in it, it will fail, but if you opened a file in /usr/include, and did the same command, it will hopefully identify printf.

A more general way to ask about GNU Global is with:

M-x cedet-gnu-global-version-check RET

That all said, the GNU Global support is best in situations where you want to have lots and lots of preparsed files that you access infrequently. Once a header is accessed once (like for printf), then the GNU Global database won't be used anymore, because an equivalent Semantic database will have been created for it. This is necessary because GNU Global does not provide enough information to do smart completion.

like image 128
Eric Avatar answered Oct 17 '22 16:10

Eric