From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71727: Deleting TAGS buffer will cause `etags-regen--update-file` doesn't work Date: Fri, 28 Jun 2024 04:23:32 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19864"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Siyuan Chen , 71727@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 28 07:52:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sN4Wx-0004ya-8i for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jun 2024 07:52:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sN4Wk-0008Cz-TG; Fri, 28 Jun 2024 01:52:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sN4Wh-0008CD-TF for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 01:52:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sN4Wh-00074F-Ky for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 01:52:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sN4Wg-0000RJ-7y for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 01:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2024 05:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71727 X-GNU-PR-Package: emacs Original-Received: via spool by 71727-submit@debbugs.gnu.org id=B71727.17195539041666 (code B ref 71727); Fri, 28 Jun 2024 05:52:02 +0000 Original-Received: (at 71727) by debbugs.gnu.org; 28 Jun 2024 05:51:44 +0000 Original-Received: from localhost ([127.0.0.1]:51376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4WO-0000Qj-Jf for submit@debbugs.gnu.org; Fri, 28 Jun 2024 01:51:44 -0400 Original-Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]:57421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4WM-0000QO-9u for 71727@debbugs.gnu.org; Fri, 28 Jun 2024 01:51:43 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 7C79A1140214; Thu, 27 Jun 2024 21:23:34 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 27 Jun 2024 21:23:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1719537814; x=1719624214; bh=5PfzzIDSKWBphS1nj1toAjtHOOU+WUj3gMe82T3/+qs=; b= 10gLyMs/MulDTQrJTQH2hdRSDV3DL4WcTv9hyn+J/TpAAYCVwassKQhNyWBRJHxy 68HtG72WlcCR4ik/PSrapJ7QT3cpZWMGTlsS43P+7Qa9qv4WEo2jXhcVvyyEJSR4 jfo1yuZvhW4G1oLLyqiFerYqeoMhXBtZ0ePheVB/1gsiVCWo1vcR+gp0alHUGxBC faMWibBLjuZ+jAZ9AuLMIi/U+4M94SMpqSXzkFzGKIl7V9Emlb4JKERkbxDGQd71 dhA83ByFbF5Jeqod1HsEe7g8vveEjuPzA2jSFtfYGkqyr9yg0ZNMI2hudg1vrADM 61dx06R3R3wXxa9My+iXeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719537814; x= 1719624214; bh=5PfzzIDSKWBphS1nj1toAjtHOOU+WUj3gMe82T3/+qs=; b=G GMxiyAYZnoOdqkMdefwEKoDFZZ23+4/gzRxij3AvdSOj7pf9yUlIbL5NJqD8u/ZK 4tOMsiHdaPy1OYWwRLhR5IJRkT+H7voKAMtaR+2YXWWaE1OMtUQOAs4GM22yPC50 NvqRWddNzYv6OF7Bd0d2B40zDmlMrpLEVW+pmzxxM2t4bGf2wOXyzVpBUEJyBI78 QRy4bAqrXDPpUmjjmKU/TZjk6yze66xWWVOjYpRZ4NegvTcCoBczxGiUgXk7CFrW gYoKFZgchJD7t71YGu8Bz0f9VeBcPvjR3ijmh1u03z4P909gwz1VBpLb8tzxOGvh LqyX377mYUA74mtXbghKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtdehgdegkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejre dttddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhht ohhvrdguvghvqeenucggtffrrghtthgvrhhnpedthfeuvddtveelgeeuleevvdejveehff evveehvdeuffdtfefhvdeugefgtefgtdenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Jun 2024 21:23:33 -0400 (EDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288039 Archived-At: 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.