7

I am trying to find a way to auto-regenerate tags for my application and visit those tags in emacs to try to improve my workflow. Is it possible to get emacs to detect changes in TAG file and re-visit it ?

2 Answers 2

9

There is a tags setting:

(setq tags-revert-without-query t) 

Which will tell tags functionality to re-visit the TAGS file if it changes on disk. This check happens every time you invoke a tags function.

Sign up to request clarification or add additional context in comments.

1 Comment

@anair I do not use cron to update TAGS. I've found that the TAGS file generally works well for several weeks in my work flows, and the script I have to generate new work areas automatically generates a TAGS file for me... Obviously, other environments/workflows may require frequent updating of TAGS files.
3

Maybe not exactly what you're looking for, but I have a small function to regenerate and re-visit the tags table in the current working directory that 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))) 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.