[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatic (e)tags generation and incremental updates

From: Dmitry Gutov
Subject: Re: Automatic (e)tags generation and incremental updates
Date: Tue, 12 Jan 2021 19:32:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 12.01.2021 19:15, Eli Zaretskii wrote:
Cc: tom@tromey.com, john@yates-sheets.org, philipk@posteo.net,
From: Dmitry Gutov <dgutov@yandex.ru>
Date: Tue, 12 Jan 2021 18:48:24 +0200

(insert-file-contents "...") takes 0.15 in this example, which would
make it possible to use if etags implemented the same logic that we do
in Elisp currently

Which logic is that? what does it do?

It removes the existing entry for the file from the index, and scans the file again (with etags) to add the updated entry for it at the end.

Anyway, TAGS and etags.el were designed to be very tolerant to
changes, so you shouldn't need to update very often.

I want it to update reliably; maybe not too often (depending on a
project), but if a user switches to a different Git branch, they should
be confident that they'll see the changes reflected in the index soon.
Even (and especially) if those are big changes.

What about regenerating etags only if M-. etc. fail to find an

There are downsides.

You will have to press M-. twice sometimes with that approach. Completion will routinely fail to show some tags that should be present. Also, if the rescan takes a while, I'm not sure you'd want to do that on every 'M-.' failure.

But this could be an optional mode of operation.

Right now only the update-on-save feature is in there, but I have to
tell you, having a newly written function in the index right away
(without having to invoke any commands or switch to the terminal) is
pretty nice.

Of course, but then the user will need to be prepared to pay the
price.  TANSTAAFL.

I think the current state of the feature has already reduced a few prices. And we should be able to go further.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]