GNU bug report logs - #54133
29.0.50; Buffer-menu-visit-tags-table disrupts non-tags buffers

Previous Next

Package: emacs;

Reported by: Bob Rogers <rogers <at> rgrjr.com>

Date: Wed, 23 Feb 2022 21:38:01 UTC

Severity: normal

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 54133 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bob Rogers <rogers <at> rgrjr.com>
Cc: 54133 <at> debbugs.gnu.org
Subject: Re: bug#54133: 29.0.50;
 Buffer-menu-visit-tags-table disrupts non-tags buffers
Date: Thu, 24 Feb 2022 19:42:14 +0200
> From: Bob Rogers <rogers <at> rgrjr.com>
> Date: Thu, 24 Feb 2022 12:30:53 -0500
> Cc: 54133 <at> debbugs.gnu.org
> 
>    From: Eli Zaretskii <eliz <at> gnu.org>
>    Date: Thu, 24 Feb 2022 17:15:54 +0200
> 
>    > From: Bob Rogers <rogers <at> rgrjr.com>
>    > 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?




This bug report was last modified 3 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.