unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Siyuan Chen <chansey97@gmail.com>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 71727@debbugs.gnu.org
Subject: bug#71727: Deleting TAGS buffer will cause `etags-regen--update-file` doesn't work
Date: Sat, 29 Jun 2024 19:49:50 +0800	[thread overview]
Message-ID: <CAHWTsY=qFgSa00ZpkU+9LqswNSqvSOUGsN4koSZuvt98BJWpDA@mail.gmail.com> (raw)
In-Reply-To: <d62ebe0d-f847-4c0d-b29d-f916298cc9fe@gutov.dev>

[-- Attachment #1: Type: text/plain, Size: 1826 bytes --]

 > Is there are particular reason you killed the TAGS buffer?

No. I found this bug is just because I tried to view the TAGS content while
editing a .c file and then closed it (I am using tab-line-mode with
tab-line-close-tab-function set to kill-buffer). Since then, I have stopped
closing the TAGS buffer.

Another option is to temporarily add documentation advising users not to
close the TAGS buffer, because closing it accidentally can result in the
odd behavior.

Best regards,
Siyuan Chen


On Fri, Jun 28, 2024 at 9:23 AM Dmitry Gutov <dmitry@gutov.dev> wrote:

> Hi!
>
> Thanks for the report.
>
> On 23/06/2024 02:55, Siyuan Chen wrote:
> > 5. M-x kill-buffer TAGS
> >
> > 6. Add `#define APPLICATION_WINDOW_HEIGHT 320` to test.c and M-x
> save-buffer
> >
> > 7. Move the cursor to APPLICATION_WINDOW_HEIGHT and M-x
> > xref-find-definitions.
>
> What happens here, is etags-regen--update-file (added to
> after-save-hook) fails the check
>
>    (get-file-buffer etags-regen--tags-file)
>
> and so the buffer and the file are not updated.
>
> Note that if after step 7 you make an edit to the same file and then try
> navigating again it will work because at step 7 the tags file is visited
> again. So this doesn't seem an urgent problem, but it would be nice to
> fix nevertheless.
>
> I think we couldn't re-visit the tags file inside after-save-hook (it
> might not be fast enough, for one thing), but the second alternative
> mentioned inside the TODO at the top of etags-regen--update-file should
> be fix this as well.
>
> Is there are particular reason you killed the TAGS buffer? Perhaps a
> quicker fix would be to visit the tags file in a hidden buffer, rather
> than use the name that's so easy to find and kill or do something else
> by accident.
>

[-- Attachment #2: Type: text/html, Size: 3885 bytes --]

  reply	other threads:[~2024-06-29 11:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-22 23:55 bug#71727: Deleting TAGS buffer will cause `etags-regen--update-file` doesn't work Siyuan Chen
2024-06-27  8:49 ` Eli Zaretskii
2024-06-28  1:23 ` Dmitry Gutov
2024-06-29 11:49   ` Siyuan Chen [this message]
2024-07-09  2:50     ` Dmitry Gutov
2024-07-11  0:50       ` 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='CAHWTsY=qFgSa00ZpkU+9LqswNSqvSOUGsN4koSZuvt98BJWpDA@mail.gmail.com' \
    --to=chansey97@gmail.com \
    --cc=71727@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).