Re: Command for indexing source code

"Eric M. Ludlam" <[email protected]>
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
On 07/17/2014 02:42 AM, Tu Do wrote:
>
> Hi Eric,
>
> Semantic usability could be improved by allowing users to parse
> all the header files in advance, so they can have immediate
> completions without having to wait for Semantic to parse, which is
> time-consuming in a fairly large project. So, when users add new code,
> it will only take a brief delay for Semantic to update.
>
> I think this makes sense because other IDEs also perform indexing in
> advance before users work on their source code.

Hi,

There are a couple choices.  One is to use something like GNU Global and 
some of the special back-ends that allow Semantic to use it to parse 
headers.

The other is to just edit your files, and Semantic will parse all the 
headers you use in the background.

The advantage to not parsing all the files, particularly for a large 
project, is that once all the files are parsed, the data structure makes 
the Emacs huge, and if Emacs starts swapping during garbage collect, it 
goes very slowly. :(

Writing a script to do what you want is pretty easy.   Something along 
the lines of:

emacs -batch someheader.h -f semantic-idle-work-core-handler

I think there are examples on Emacs wiki somewhere.

If you open a new project and want to get it overwith, you can do:

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

and wait for it to parse neighboring files, and files needed for completion.

Eric

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.