From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54133: 29.0.50; Buffer-menu-visit-tags-table disrupts non-tags buffers Date: Thu, 24 Feb 2022 19:42:14 +0200 Message-ID: <83zgmgqhzd.fsf@gnu.org> References: <25110.43271.146078.920965@orion.rgrjr.com> <8335k8s3bp.fsf@gnu.org> <25111.49357.417530.307552@orion.rgrjr.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34111"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54133@debbugs.gnu.org To: Bob Rogers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 24 18:43:54 2022 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 1nNI9i-0008lF-Cn for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Feb 2022 18:43:54 +0100 Original-Received: from localhost ([::1]:34492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNI9g-0000L3-Vl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Feb 2022 12:43:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNI8u-0000Kr-4Q for bug-gnu-emacs@gnu.org; Thu, 24 Feb 2022 12:43:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNI8s-00021Z-CW for bug-gnu-emacs@gnu.org; Thu, 24 Feb 2022 12:43:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNI8s-0004r4-Az for bug-gnu-emacs@gnu.org; Thu, 24 Feb 2022 12:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Feb 2022 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54133 X-GNU-PR-Package: emacs Original-Received: via spool by 54133-submit@debbugs.gnu.org id=B54133.164572452918594 (code B ref 54133); Thu, 24 Feb 2022 17:43:02 +0000 Original-Received: (at 54133) by debbugs.gnu.org; 24 Feb 2022 17:42:09 +0000 Original-Received: from localhost ([127.0.0.1]:50323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNI81-0004pq-03 for submit@debbugs.gnu.org; Thu, 24 Feb 2022 12:42:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNI7y-0004pK-UR for 54133@debbugs.gnu.org; Thu, 24 Feb 2022 12:42:07 -0500 Original-Received: from [2001:470:142:3::e] (port=47764 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNI7t-0001tn-Hu; Thu, 24 Feb 2022 12:42:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KvzJFq2qcSSQQEV48164od5D7zaANd2UTVUz2SkygWI=; b=LJRx8Qpiq4aP YCsTnwprLDqWmCDPipIIK6hFIRO8/pFF7Mz9mcTgc6qE1F0yoni0s3QyFp+U1AXzgUfa+Jyrk3TDw OUPLIxB2Xl7L3in7uLyGDdqkKBYL5g+VOaiCp3sxCCRpU4mWGJICNe0L/gi/TcD+fBVTSrblxVgFt w8Cxptsup82jqr7Iu6UWD1NJxIS79yyuiC/khbsbemQX9uhw3NKMeIui+2tgebkZ0nz7LwK58ynWH MwhorcOqrMjiBGBsnzOvIzzce+KQE1h0Ag5JDDN2XVPB8J/t/nKbcMBBjls5VcqpsUoKdPD044wfz v8BPdePlAn0Kyvb7gTW1Qw==; Original-Received: from [87.69.77.57] (port=3262 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNI7t-0007Zc-0u; Thu, 24 Feb 2022 12:42:01 -0500 In-Reply-To: <25111.49357.417530.307552@orion.rgrjr.com> (message from Bob Rogers on Thu, 24 Feb 2022 12:30:53 -0500) 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" Xref: news.gmane.io gmane.emacs.bugs:227591 Archived-At: > From: Bob Rogers > Date: Thu, 24 Feb 2022 12:30:53 -0500 > Cc: 54133@debbugs.gnu.org > > From: Eli Zaretskii > Date: Thu, 24 Feb 2022 17:15:54 +0200 > > > From: Bob Rogers > > Date: Wed, 23 Feb 2022 16:37:11 -0500 > > > > . . . > > > > The real problem is that visit-tags-table assumes that the user knows > > what they're doing, and makes these irreversible changes before being > > sure of having a valid tags table. That would be a harder thing to fix, > > though -- and might not deal as well with my buffer-menu typos. ;-} > > Does the alternative patch below give good results? > > This does ineed work, and I had considered something similar, but was > concerned that it would not be as robust. etags-verify-tags-table is > called from etags-recognize-tags-table, which is only a part of the > tags-table-format-functions extension mechanism used by > initialize-new-tags-table. So to avoid breaking this mechanism I would > either have had to call initialize-new-tags-table and have it possibly > set unwanted local variables, or delve more deeply into the internals by > running tags-table-format-functions myself. Maybe we should have a more thorough implementation in etags-verify-tags-table, then. But that function's purpose is to do what we need here. > In short, I thought checking the major mode was the better choice, > since the file was already present in a buffer. But what if the file is already in a buffer, but not under the right major-mode? E.g., what if the file was visited literally?