Is it possible to automatically restore and load the tag table in emacs instead of continuing to work with the visit tag table?

I am trying to find a way to automatically recover tags for my application and visit those tags in emacs to try and improve my workflow. Is it possible to get emacs to detect changes in the TAG file and visit again?

+6
emacs etag
source share
2 answers

There is a tag installation:

(setq tags-revert-without-query t) 

What tag functionality will say to revisit the TAGS file if it changes on disk. This check is performed every time you call the tag function.

+8
source share

It may not be exactly what you are looking for, but I have a little function to restore and revisit the tag table in the current working directory, which I use all the time.

 (defvar tags-cmd "etags -R 2>/dev/null") (defun regen-tags () "Regenerate the tags file for the current working directory" (interactive) (let ((tag-file (concat default-directory "TAGS"))) (shell-command tags-cmd) (visit-tags-table tag-file))) 
+3
source share

All Articles