GNU bug report logs - #67687
Feature request: automatic tags management

Previous Next

Package: emacs;

Reported by: Jon Eskin <eskinjp <at> gmail.com>

Date: Thu, 7 Dec 2023 11:45:02 UTC

Severity: wishlist

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Jon Eskin <eskinjp <at> gmail.com>
Cc: 67687 <at> debbugs.gnu.org
Subject: bug#67687: Feature request: automatic tags management
Date: Sun, 10 Dec 2023 04:41:15 +0200
[Message part 1 (text/plain, inline)]
Hi Jon!

On 07/12/2023 21:57, Jon Eskin wrote:

>> I have some related work that's been lying in a drawer as of late.
>>
>> Do you know what gutentags does when a file is deleted, or added externally, or you switch to a different Git branch and many files change their contents at once?
> To my knowledge, changes to tags due to files being added or deleted are regenerated only when vim is started inside the project. Switching to a different git branch should work the same, because it’s only looking at the filesystem.
> 
> If the editor is already running, such changes will not be picked up; even if you try to navigate to a tag that no longer exists, I do not believe that it will regenerate tags automatically until you close and re-open the editor.
> 
> When you save a file inside the editor, it will wipe out tags for that individual file and regenerate them.

All right, sounds like this kind of limited guarantees (tags getting out 
of date occasionally, e.g. when switching branches) is apparently okay.

See attached the aforementioned related work, with some updates and 
simplifications (e.g. this version of the patch doesn't require a change 
to project.el).

Usage: 'M-x etags-regen-mode' to turn it on (or customize this variable, 
to have it on from the beginning of each session), then as soon as you 
use features based on tags (such as M-. or completion) the table should 
get generated automatically for the current project, and then get 
updated when files are edited and saved.

Some features could be added later (such as asynchronous updates or -- 
someday -- filenotify based invalidations), but I think the current 
state is useful already.

Feedback welcome.
[etags-regen.diff (text/x-patch, attachment)]

This bug report was last modified 1 year and 142 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.