Question

There were some people on stackoverflow having a problem like this but not exactly this and not exactly the solution I'm looking for. The problem is auto generating tag file by etags if the tag file didn't exist ( through emacs). I wanna log all the files and it is not limited to c or whatever and auto load it through emacs. I'm not interested in having any role in loading tag file.

Any idea?

Was it helpful?

Solution

For me I put the following line in my makefile file:

tags:
    find -type f -name "*.[ch]" -print0 | xargs -0 etags -o TAGS -a -l c

I refresh the tags with M-! compile, then make tags.

Emacs auto-detects that the TAGS file was refreshed, and asks you if you need to re-load it.

Otherwise, you can type M-x tags-reset-tags-table, and when you search something with M-., Emacs auto-loads the new generated file.

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