emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] New package: mctags


From: Tom Tromey
Subject: Re: [ELPA] New package: mctags
Date: Sat, 21 Oct 2017 13:59:30 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:

Stefan> So I think the better answer is to let the user teach etags.el how to
Stefan> create the TAGS file in such special cases (i.e. it can have a default
Stefan> system, based on *.o thingies or based on VCS data, but that can be
Stefan> overridden on a per-project basis, e.g. via .dir-locals.el).

I have some patches to etags (not etags.el) to do this.

The idea is to have a ".etags" config file that tells etags what to do.
Then "etags --find" will read this file, walk the directory tree, and
update the TAGS file.

Here's a sample config file based on what gdb's "make TAGS" currently
does:

    # Ignore some test suite files.
    !testsuite/*.[chylmsS]

    # Ignore some other things.
    !*.def
    !*/Makefile*

    # Handle DejaGNU (Tcl) files using regexps.
    *.exp    --language=none 
--regex='/\(gdb_caching_proc\|proc\|proc_with_prefix\)[ \t]+\([^ \t]+\)/\2/'



Making etags.el auto-update with this is simple: just run "etags --find".
It would also be easy to script this using inotify-tools.

This work still has some minor things to clean up.  I didn't make
--include work (I think --find should stop at any subdirectory .etags it
finds, and then process those directories separately -- that is, include
should be automatically handled); and there's some argument validation
to be implemented.

If this sounds interesting, I can clean it up and send it.

Tom



reply via email to

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