8

From what I can tell from the docs, semantic works by slowly building up an idea of what's in your project by analysing each file (and possibly its neighbours) as you visit them. This is too slow. I'd like to just have it visit all the files in my project. Is there an easy way to do this? Having to visit hundreds of files before I can get decent autocomplete working seems crazy.

I've also got a etags file generated. Can I leverage that somehow?

Relevant info: Emacs on Windows, version 23.2.1

2

2 Answers 2

7

CEDET will automatically parse all files references via #include statements, thus providing pretty good completion. If you are looking to jump around in your files, you can setup CEDET to use GNU Global, CScope, to provide the database needed to move around a project by tag name.

In addition, CEDET will parse your headers and nearby files in idle time, so eventually you will have a complete database of all your local files in about 10 minutes after using the tools the first time. You can speed it up by opening a file, and calling

 M-x semantic-debug-idle-work-function

which will go off and do that stuff without waiting.

1
  • Thanks, Eric. I've got the idle work functions going right now. I suspect at this point that I've got small problems with my setup. I'm using the Emacs 23 integrated version of CEDET, so all the articles on setting things up include things that are no longer relevant or possible. Using simple test cases, I can't get Semantic to complete anything except the most simple in-file information (ie., no member variable completion works). I'll also try out GNU Global. Thanks! Jun 1, 2010 at 16:24
1

In the end, I've found that the best solution is to brute-force the parsing of the files manually using a bit of elisp. The best answer I've found to this is here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.