Question

I have a .ctags file with a language similar definition similar to that specified in the ctags docs:

  --langdef=swine
  --langmap=swine:.swn
  --regex-swine=/^def[ \t]*([a-zA-Z0-9_]+)/\1/d,definition/

Is it possible to do the same thing with etags? When building a new TAGS file I noticed (maybe for obvious reasons) my ~/.ctags file had no effect. I even tried copying ~/ctags to ~/.etags. Likewise, I have come up dry for documentation on creating an .etags file.

Is this possible, am I missing steps, and does anyone know where I can find similar docs for etags (if it differs)?

Edit: For the record my .ctags did exactly as I wanted, but I had to explicitly define "--regex=" when running etags for the same effect.

Documentation: http://www.gnu.org/software/emacs/manual/html_node/emacs/Etags-Regexps.html

Was it helpful?

Solution

You are possibly running ctags ("Exuberant Ctags") from SourceForce, but the etags supplied with Emacs?

Try invoking ctags -e instead of etags ?

Edit: I am presuming that your .ctags config does actually take effect when you run ctags? You haven't explicitly stated whether that is the case, and if not then you may not actually be using the ctags that you think you are.

What do ctags --version and etags --version report?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top