Emacs, Cedet and semantic

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

  • I've generated GTAGS with Gnu Global in my /usr/include , how can i check if semantic is using GTAGS?
  • Can I keep my GTAGS in another directory and instruct semantic to use that dir?
  • 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

  • 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.

    链接地址: http://www.djcxy.com/p/44846.html

    上一篇: Emacs imenu与cedet代码自动集成

    下一篇: Emacs,Cedet和语义