[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto-refresh TAGS file on ChangeLog mod?
From: |
Tom Tromey |
Subject: |
Re: auto-refresh TAGS file on ChangeLog mod? |
Date: |
Thu, 21 Aug 2008 10:31:26 -0600 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
>>>>> "Ted" == Ted Zlatanov <address@hidden> writes:
Ted> On Mon, 18 Aug 2008 09:28:59 -0500 Ted Zlatanov <address@hidden> wrote:
TZ> I'm curious if there's a way to auto-run etags in a directory when I run
TZ> `find-tag' if the ChangeLog file (or any other file I specify) is newer
TZ> than the TAGS file. In Makefile format, this is simply
Ted> I got no answers on gnu.emacs.help. Maybe someone on emacs-devel will
Ted> have an idea.
I tried to solve this problem a couple times. Actually, I tried to
solve the more general problem of auto-updating TAGS in response to
any change, not just a change to some sentinel file.
Once I wrote a big patch to put the etags command-line arguments into
the TAGS file, so you could reliably re-run etags when a file was
saved. This never went in; in the end I think it is not the best
approach, since it doesn't handle changes occurring outside of Emacs,
and it doesn't have a way to handle new files.
My next approach was a "retags" script. This uses inotify to watch
for file changes, then re-runs etags. It uses a simple ".retags" file
to decide how to invoke etags -- this solves the "new file" problem.
I can send retags to you if you want. I posted it to emacs-sources
once. It is pretty slow, especially the first time it starts. That
is the main reason I don't use it.
I've wanted to roll the retags idea into etags itself. It could read
a ".retags" file, daemonize, and use inotify to watch for changes in a
directory tree. I never found the time to do it though.
Tom
Message not available