From: Benjamin Rutt <rutt.4+news@osu.edu>
Subject: Re: ancient TAGS references to deleted files remain in memory
Date: Fri, 30 Apr 2004 15:21:27 -0400 [thread overview]
Message-ID: <87zn8ts24o.fsf@osu.edu> (raw)
In-Reply-To: 87hdv2tqbe.fsf@osu.edu
Benjamin Rutt <rutt.4+news@osu.edu> writes:
> I rebuild my TAGS files often (like 3 times per hour) via
>
> find /some/projectdir -name "*.c" -o "*.cpp" -o "*.h"
>
> I have two of these files in tags-table-list. By updating TAGS files
> often, new methods, variables, etc. that I add in my code are
> frequently picked up automatically by the time I want to visit them
> with M-. or M-x tags-search.
>
> However, sometimes, I delete files from my project directories, yet
> the TAGS file must still somehow contain some entries in memory that
> reference these deleted files. I get errors like the following during
> M-x tags-search:
>
> Opening input file: no such file or directory, /some/projectdir/STORM/quality/system/stormtestbinaryds.cpp
>
> where the mentioned filename is one I had deleted.
FYI, I'm fixing this for now by killing all TAGS buffers before M-x
tags-search is called:
;; for now, fix bug of files disappearing from TAGS files messing up
;; M-x tags-search. in the future, fix the logic in
;; `tags-verify-table' to detect files being removed. The problem is
;; that in the TAGS buffers, the buffer-local variable
;; `tags-table-files' is out of date.
(defadvice tags-search (before kill-TAGS-buffers activate)
(let ((active-TAGS-bufs
(delq nil
(mapcar
(lambda (x)
(if (string-match "TAGS$" (buffer-name x)) x nil))
(buffer-list)))))
(mapc
(lambda (x)
(kill-buffer x))
active-TAGS-bufs)))
When I have more time, I'll look at a better solution, maybe a patch
to etags.el is needed.
--
Benjamin Rutt
prev parent reply other threads:[~2004-04-30 19:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-29 21:41 ancient TAGS references to deleted files remain in memory Benjamin Rutt
2004-04-30 19:21 ` Benjamin Rutt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zn8ts24o.fsf@osu.edu \
--to=rutt.4+news@osu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).