unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jon Eskin <eskinjp@gmail.com>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 67687@debbugs.gnu.org
Subject: bug#67687: Feature request: automatic tags management
Date: Thu, 7 Dec 2023 14:57:08 -0500	[thread overview]
Message-ID: <E376DCB6-E417-4FBE-B672-05B8D520CEAE@gmail.com> (raw)
In-Reply-To: <2f86b882-9ec1-f63f-d90b-5f8f7ae114f2@gutov.dev>

Hi Dmitry!

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

Here are some docs for customization options you might find interesting:

  *gutentags_generate_on_missing*
g:gutentags_generate_on_missing
                        If set to 1, Gutentags will start generating an initial
                        tag file if a file is open in a project where no tags
                        file is found. See |gutentags_project_root| for how
                        Gutentags locates the project.
                        When set to 0, Gutentags will only generate the first
                        time the file is saved (if
                        |gutentags_generate_on_write| is set to 1), or when
                        |GutentagsUpdate| or |GutentagsGenerate| is run.
                        Defaults to 1.

                                                *gutentags_generate_on_new*
g:gutentags_generate_on_new
                        If set to 1, Gutentags will start generating the tag
                        file when a new project is open. A new project is
                        considered open when a buffer is created for a file
                        whose corresponding tag file has not been "seen" yet
                        in the current Vim session -- which pretty much means
                        when you open the first file in a given source control
                        repository.
                        When set to 0, Gutentags won't do anything special.
                        See also |gutentags_generate_on_missing| and
                        |gutentags_generate_on_write|.
                        Defaults to 1.

                                                *gutentags_generate_on_write*
g:gutentags_generate_on_write
                        If set to 1, Gutentags will update the current
                        project's tag file when a file inside that project is
                        saved. See |gutentags_project_root| for how Gutentags
                        locates the project.
                        When set to 0, Gutentags won't do anything on save.
                        This means that the project's tag file won't reflect
                        the latest changes, and you will have to run
                        |GutentagsUpdate| manually.
                        Defaults to 1.

                                            *gutentags_generate_on_empty_buffer*
g:gutentags_generate_on_empty_buffer
                        If set to 1, Gutentags will start generating the tag
                        file even if there's no buffer currently open, as long
                        as the current working directory (as returned by
                        |:cd|) is inside a known project.
                        This is useful if you want Gutentags to generate the
                        tag file right after opening Vim.
                        Defaults to 0.

More can be found here: https://github.com/ludovicchabant/vim-gutentags/blob/master/doc/gutentags.txt




  reply	other threads:[~2023-12-07 19:57 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 11:43 bug#67687: Feature request: automatic tags management Jon Eskin
2023-12-07 15:57 ` Dmitry Gutov
2023-12-07 19:57   ` Jon Eskin [this message]
2023-12-10  2:41     ` Dmitry Gutov
2023-12-10 11:38       ` Jon Eskin
2023-12-20 21:11         ` Jon Eskin
2023-12-21  0:24           ` Dmitry Gutov
2023-12-21  7:40             ` Eli Zaretskii
2023-12-21 16:46               ` Dmitry Gutov
2023-12-21 23:37                 ` Dmitry Gutov
2023-12-24  1:43                   ` Dmitry Gutov
2023-12-28  9:30                     ` Eli Zaretskii
2023-12-30  3:05                       ` Dmitry Gutov
2023-12-30  7:33                         ` Eli Zaretskii
2023-12-30 23:43                           ` Dmitry Gutov
2023-12-31  1:02                             ` Stefan Kangas
2023-12-31 23:29                               ` Dmitry Gutov
2024-01-02  0:40                                 ` Stefan Kangas
2024-01-02  1:31                                   ` Dmitry Gutov
2023-12-31  7:07                             ` Eli Zaretskii
2023-12-31 15:21                               ` Dmitry Gutov
2023-12-29 22:29                     ` Stefan Kangas
2023-12-30  1:50                       ` Dmitry Gutov
2023-12-30 20:31                         ` Stefan Kangas
2023-12-30 22:50                           ` Dmitry Gutov
2023-12-30 23:25                             ` Stefan Kangas
2023-12-30 23:58                               ` Dmitry Gutov
2023-12-31  7:23                                 ` Eli Zaretskii
2023-12-31 15:31                                   ` Dmitry Gutov
2023-12-29 22:17                 ` Stefan Kangas
2023-12-30  1:31                   ` Dmitry Gutov
2023-12-30 20:56                     ` Stefan Kangas
2023-12-30 23:23                       ` Dmitry Gutov
2023-12-31  0:03                         ` Stefan Kangas
2023-12-31  6:34                       ` Eli Zaretskii
2023-12-31  7:22                         ` Stefan Kangas
2023-12-31 15:22                           ` Dmitry Gutov
2023-12-31 15:25                         ` Dmitry Gutov
2023-12-31 16:42                           ` Eli Zaretskii
2023-12-31 17:53                             ` Dmitry Gutov
2023-12-31 19:27                               ` Eli Zaretskii
2024-01-01  1:23                                 ` Dmitry Gutov
2024-01-01 12:07                                   ` Eli Zaretskii
2024-01-01 15:47                                     ` Dmitry Gutov
2024-01-01 16:50                                       ` Eli Zaretskii
2024-01-01 17:23                                         ` Dmitry Gutov
2024-01-01 17:39                                           ` Eli Zaretskii
2024-01-01 18:48                                             ` Dmitry Gutov
2024-01-01 19:25                                               ` Eli Zaretskii
2024-01-02  1:40                                                 ` Dmitry Gutov
2024-01-04  1:56                                                   ` Dmitry Gutov
2024-01-02 10:41                               ` Francesco Potortì
2024-01-02 13:09                                 ` 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=E376DCB6-E417-4FBE-B672-05B8D520CEAE@gmail.com \
    --to=eskinjp@gmail.com \
    --cc=67687@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    /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).