|
From: | Dmitry Gutov |
Subject: | Re: Generation of tags for the current project on the fly |
Date: | Wed, 17 Jan 2018 00:56:01 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 |
On 1/16/18 20:50, Eli Zaretskii wrote:
Incremental tagging needs to leave the record about what was taggedsomewhere, right?
The information is inside the TAGS file, isn't it? Even though it's in a flat list, unsorted, spread throughout the file.
I was thinking that maybe we can add this feature simply using some clever engineering, without changing the format of the file.
And I think it should be fairly easy (in terms of the algorithm, at least) to implement incremental update for one-to-few files: you scan through the file, remove the corresponding entries, and then scan the files (ones that still exist) and add those entries at the end.
Might be slower to incrementally update when passed (almost) the same list of files, like 'make tags' does. It has higher complexity on paper (looking for/matching file names), but maybe it would still yield a measurable improvement over a full reindex.
Since there's no such feature in etags now, this sounds like a project for which I won't have time any time soon. Any volunteers?
Not volunteering yet. Could be something I might have time for a few months from now, depending on whether we have a solid plan and you'll want to provide some hand-holding.
I more or less imagine how I'd implement such a feature using Lisp and 'etags --append', but that would do nothing to help when the tags are generated by make.It will also not help if Emacs is restarted, right?
Right, but it will do a full scan after the restart. Spending a longer amount of time just once per project per restart is more or less fine, I think. Especially after an explicit prompt (I've added one now, you can see it on the branch).
[Prev in Thread] | Current Thread | [Next in Thread] |