unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: philipk@posteo.net, tom@tromey.com, john@yates-sheets.org,
	emacs-devel@gnu.org
Subject: Re: Automatic (e)tags generation and incremental updates
Date: Thu, 7 Jan 2021 17:56:57 +0200	[thread overview]
Message-ID: <0bee9ab4-46bc-b6fd-97b6-e26cc80f1610@yandex.ru> (raw)
In-Reply-To: <83r1mwltob.fsf@gnu.org>

Hi Eli,

On 07.01.2021 16:15, Eli Zaretskii wrote:
> Thanks for working on this branch.
> 
> However, it is hard to check it out without investing an inordinate
> amount of time, without having some guidance: what features are added,
> how they work, and what are the relevant commands to invoke them and
> variables to control them.  Would it be possible to post a short
> summary of that?  The changes are large, and when I looked at them, it
> was hard for me to figure out what exactly are we gaining and how to
> test that.

The changes are now fairly small and non-invasive, you can review the 
diff like this: git diff master...scratch/etags-regen

They include:

- New file and new minor mode etags-regen-mode with 3 defcustom's (see 
the docstrings).

- A change to .dir-locals.el which sets the value of one of those 
options, so that the resulting tags table for the Emacs project itself 
looks close enough to what 'make tags' generates.

- A change to lib-src/etags.c which implements handing of '-L' flag, for 
compatibility with ctags.

To try it out:

- Start Emacs built from this branch and open, say, src/xdisp.c.

- Call 'M-x etags-regen-mode' to enable it.

- DO NOT call 'M-x visit-tags-table'.

- Call some xref command like 'M-.'. See message "Generating new tags 
table..." (it's saved in /tmp/...), then see navigation happen.

- Pressing C-M-i instead should also trigger tags table generation.

- Rename some function, try navigating to the new name. That should 
work. Navigation to the previous name should fail (unless there are 
other definitions for that name).

What doesn't work:

- When you switch between projects, the previously generated tags tables 
are discarded. It's not too hard to improve, but that would involve some 
choices/tradeoffs.

- When files are deleted, or otherwise changed outside of Emacs (perhaps 
with 'git checkout'), nothing is updated. I have a few new ideas, 
haven't started on them yet. Workaround: toggle etags-regen-mode off and 
on, which will result in full rescan when you use 'M-.'.



  reply	other threads:[~2021-01-07 15:56 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  3:36 Automatic (e)tags generation and incremental updates Dmitry Gutov
2021-01-07  3:46 ` Dmitry Gutov
2021-01-07 14:15   ` Eli Zaretskii
2021-01-07 15:56     ` Dmitry Gutov [this message]
2021-01-07 16:17       ` Stefan Kangas
2021-01-09 21:49       ` Tom Tromey
2021-01-10 13:53         ` Dmitry Gutov
2021-01-10 16:56           ` Tom Tromey
2021-01-10 19:39             ` Tom Tromey
2021-01-10 23:09               ` Dmitry Gutov
2021-01-10 23:36             ` Dmitry Gutov
2021-01-10 23:50               ` Dmitry Gutov
2021-01-11 14:56                 ` Eli Zaretskii
2021-01-12  1:33                   ` Dmitry Gutov
2021-01-12  4:21                     ` Stefan Monnier
2021-01-12 16:59                       ` Dmitry Gutov
2021-01-12 17:24                         ` Stefan Monnier
2021-01-12 15:08                     ` Eli Zaretskii
2021-01-12 16:48                       ` Dmitry Gutov
2021-01-12 17:15                         ` Eli Zaretskii
2021-01-12 17:32                           ` Dmitry Gutov
2021-01-12 17:55                             ` Eli Zaretskii
2021-01-12 22:26                               ` Dmitry Gutov
2021-01-13 15:01                                 ` Eli Zaretskii
2021-01-13 15:52                                   ` Dmitry Gutov
2021-01-13 15:58                                     ` Eli Zaretskii
2021-01-16  3:57                                       ` Dmitry Gutov
2021-01-16  7:34                                         ` Eli Zaretskii
2021-01-10 16:49         ` Eli Zaretskii
2021-01-10 16:58           ` Tom Tromey
2021-01-10 17:56           ` Dmitry Gutov
2021-01-10 18:14             ` Eli Zaretskii
2021-01-10 23:13               ` Dmitry Gutov
2021-01-11 14:53                 ` Eli Zaretskii
2021-01-12  1:49                   ` Dmitry Gutov
2021-01-12 15:09                     ` Eli Zaretskii
2021-02-18 23:26       ` Dmitry Gutov
2021-02-19  8:33         ` Eli Zaretskii
2021-02-19 14:35           ` Dmitry Gutov
2021-02-19 15:44             ` Eli Zaretskii
2021-02-20  1:35               ` Dmitry Gutov
2021-02-20  7:30                 ` Eli Zaretskii
2021-02-20 20:27                   ` Dmitry Gutov
2021-02-20 20:41                     ` Eli Zaretskii
2021-02-20 21:05                       ` Dmitry Gutov
2021-02-20 21:14                       ` Dmitry Gutov
2021-02-21 19:53                         ` Eli Zaretskii
2021-02-21 20:39                           ` Dmitry Gutov
2021-02-22 16:08                             ` Eli Zaretskii
2021-02-22 19:25                               ` Dmitry Gutov
2021-02-22 19:33                                 ` Eli Zaretskii
2021-02-23  1:15                                   ` Dmitry Gutov

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=0bee9ab4-46bc-b6fd-97b6-e26cc80f1610@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=john@yates-sheets.org \
    --cc=philipk@posteo.net \
    --cc=tom@tromey.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).