是否有可能在Emacs自动再生和负载标签表,而不是继续运行,访问标签表?
题
我试图找到一种方式来为我的应用程序自动再生标签和访问这些标签emacs的尝试,以提高我的工作流程。是否有可能得到的emacs检测标签文件并重新访问它的变化?
解决方案
有一个标签设置:
(setq tags-revert-without-query t)
它会告诉标签功能再访问TAGS文件,如果它在磁盘上的变化。此检查你每次调用标签功能。
其他提示
也许不完全是你要找的是什么,但我有一个小的功能,再生和重新访问标签表中,我使用所有的时间,当前的工作目录。
(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)))
不隶属于 StackOverflow