[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generation of tags for the current project on the fly

From: Eli Zaretskii
Subject: Re: Generation of tags for the current project on the fly
Date: Sun, 14 Jan 2018 18:21:00 +0200

> Cc: address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Sun, 14 Jan 2018 05:05:04 +0300
> >>> We could offer generating a tags table if we don't find one in the
> >>> tree, instead of generating it automatically.
> >>
> >> And then what? Visit it?
> > 
> > No, just do what you intended, but only after an approval.  It could
> > be that the user thought she already visited a tags table, or some
> > other mistake.
> OK, so if the user says yes, we "temporarily visit" to auto-generated 
> tags table. Then the user saves a file and that table get invalidated 
> (or via some other mechanism), and we want to index it again. Ask again?

No, I think asking once per project should be enough.

> >> Warm, probably. But that's the relevant time, isn't it?
> > 
> > Not necessarily.  The first time a tree is scanned could well be the
> > shortly after you start working on a project.
> Not sure what you mean. The tree has to be scanned *sometime* at least 
> once, hasn't it?

I mean the first time the tags table is required might very well be at
the beginning of working on a project, at which time the project
source tree is not yet in the cache.

> For instance, could you try to see how long takes the generation of the 
> file list alone? And populating the buffer with it. But without passing 
> it to etags.

What Lisp shall I use for that?
> > Invoking 'find' will always be faster, as it's optimized for
> > traversing directory trees.
> 'git ls-files' will probably be faster still.

Yes, but that only works in Git repositories.

> > No, TAGS is a standard target in GNU Makefile's.
> OK, good to know. Two questions, then:
> - Can we make it output the tags to stdout?

Not likely.  But you could just visit the TAGS file(s), no?

> - Can we detect than a given Makefile has a proper TAGS target (that can 
> output to stdout)?

Maybe CEDET has something, but if not, searching for ^TAGS: should be

> Not sure yet how to handle the TAGS files inclusions, though.

"make TAGS" should handle it, as it does in Emacs.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]