From unknown Sat Jun 21 05:15:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17326 <17326@debbugs.gnu.org> To: bug#17326 <17326@debbugs.gnu.org> Subject: Status: 24.3.90; find-tag sets global value of tags-file-name Reply-To: bug#17326 <17326@debbugs.gnu.org> Date: Sat, 21 Jun 2025 12:15:51 +0000 retitle 17326 24.3.90; find-tag sets global value of tags-file-name reassign 17326 emacs submitter 17326 Jarvis Schultz severity 17326 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 23 14:00:21 2014 Received: (at submit) by debbugs.gnu.org; 23 Apr 2014 18:00:21 +0000 Received: from localhost ([127.0.0.1]:56407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wd1T0-0004rv-19 for submit@debbugs.gnu.org; Wed, 23 Apr 2014 14:00:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57766) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcxQl-0004wB-Oz for submit@debbugs.gnu.org; Wed, 23 Apr 2014 09:41:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcxQj-0004mo-OD for submit@debbugs.gnu.org; Wed, 23 Apr 2014 09:41:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcxQj-0004mk-L2 for submit@debbugs.gnu.org; Wed, 23 Apr 2014 09:41:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcxQi-00032N-7A for bug-gnu-emacs@gnu.org; Wed, 23 Apr 2014 09:41:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcxQg-0004jT-Fa for bug-gnu-emacs@gnu.org; Wed, 23 Apr 2014 09:41:40 -0400 Received: from mail-oa0-x243.google.com ([2607:f8b0:4003:c02::243]:48676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcxQg-0004ij-7Z for bug-gnu-emacs@gnu.org; Wed, 23 Apr 2014 09:41:38 -0400 Received: by mail-oa0-f67.google.com with SMTP id j17so288357oag.6 for ; Wed, 23 Apr 2014 06:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=b+2m0n1HUSib90OHkdy/SbqY5f2XE67yylm6hqYTb5k=; b=qXiTObVzbKKEmq3WOCzaYE36FjTEQrOirpJ0/xFZIFmnGPzflAS9Efec2y+k0uPWKj DoY3mfvel6ywL4TN97E70XfLfmLN0P4dJRPsAgB8Q0U8X4FjFTIjVpXkG1rmHPaDCery exfM3xRcCx2N+DwDBoJ7X02juIFwGyfF3n1YOUSr7uZvChlwruw1R7hGiR8mLojvpm7x L2siGr1hdTKQh3XfCVkLFhDBHPnJ/Bp7wvUV95VGlRSm9aEdRftGE/1Th50xSnsNKhfP nu7agFrBXwWedG57Y7Q7lebJfthUw791efl/ADfW9+6Uj5PRD0hJ8Bjvz0Ctw8QqFnRd NgVg== X-Received: by 10.182.181.105 with SMTP id dv9mr2374889obc.59.1398260496982; Wed, 23 Apr 2014 06:41:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.0.116 with HTTP; Wed, 23 Apr 2014 06:41:16 -0700 (PDT) From: Jarvis Schultz Date: Wed, 23 Apr 2014 08:41:16 -0500 Message-ID: Subject: 24.3.90; find-tag sets global value of tags-file-name To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e0115f41a39e90b04f7b5e478 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 23 Apr 2014 14:00:13 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e0115f41a39e90b04f7b5e478 Content-Type: text/plain; charset=UTF-8 Steps to reproduce: - Open emacs with `emacs -Q' - Open source file in a directory with an already-generated TAGS file - Set tags-file-name locally using 'C-u M-x visit-tags-table' and selecting local TAGS - Use 'C-h v tags-file-name' to view value, and it says you have a buffer-local value set to the TAGS file just visited, and global value is nil - Run find-tag with 'M-.', using TAB brings up correct list of tags, and everthing is great - Re-check value of tags-file-name using 'C-h v tags-file-name', and see that the global value is now the same as the local value This causes huge problems when trying to have different tags tables associated with different buffers. Because it seems that once the global value is set, further use of find-tag does not overwrite its value, but its global value takes precedence over the local value. The only way I have been able to get around this is by explicitly setting tags-file-name and tags-table-list in .dir-local.el files in every directory that contains a TAGS table. Also note the documentation explicitly says to not set both tags-file-name and tags-table-list, but using interactive function visit-tags-table ends up setting both anyway. I have experienced this bug both in git build of emacs 24.3.90.1 listed below and in the following build from a PPA: GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on king, modified by Debian In GNU Emacs 24.3.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2014-04-22 on newton Windowing system distributor `The X.Org Foundation', version 11.0.11300000 System Description: Ubuntu 12.04.4 LTS Configured using: `configure --without-makeinfo' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: C/l Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: C-x C-f f a l f M-x t a g C-g C-u M-x v i s i t - t a g s C-h v t a g s - f M-. s t o p _ a l l _ m o M-* C-h v M-p M-p q M-x r e p o r t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Quit Starting a new list of tags tables Type C-x 1 to delete the help window. Making tags completion table for /home/jarvis/Desktop/aluminum_puppeteer/TAGS...done Mark set [2 times] Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils pp help-mode help-fns etags ring vc-git cc-langs cl cl-loaddefs cl-lib cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 110255 6347) (symbols 48 20801 0) (miscs 40 54 210) (strings 32 19268 4385) (string-bytes 1 626660) (vectors 16 12190) (vector-slots 8 407628 5169) (floats 8 65 216) (intervals 56 529 16) (buffers 960 14) (heap 1024 45108 661)) --089e0115f41a39e90b04f7b5e478 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Steps to reproduce:
=C2=A0- Open emacs = with `emacs -Q'
=C2=A0- Open source file in a directory with = an already-generated TAGS file
=C2=A0- Set tags-file-name locally= using 'C-u M-x visit-tags-table' and
=C2=A0selecting local TAGS
=C2=A0- Use 'C-h v tags-file-= name' to view value, and it says you have a
=C2=A0buffer-loca= l value set to the TAGS file just visited, and global value
=C2= =A0is nil
=C2=A0- Run find-tag with 'M-.', using TAB brings up correct list o= f tags,
=C2=A0and everthing is great
=C2=A0- Re-check v= alue of tags-file-name using 'C-h v tags-file-name', and
= =C2=A0see that the global value is now the same as the local value

This causes huge problems when trying to have different= tags tables
associated with different buffers. Because it seems = that once the global
value is set, further use of find-tag does n= ot overwrite its value, but
its global value takes precedence over the local value. The only way I=
have been able to get around this is by explicitly setting
=
tags-file-name and tags-table-list in .dir-local.el files in every
directory that contains a TAGS table.

Also no= te the documentation explicitly says to not set both
tags-file-na= me and tags-table-list, but using interactive function
visit-tags= -table ends up setting both anyway. I have experienced this
bug both in git build of emacs 24.3.90.1 listed below and in the
=
following build from a PPA:

=C2=A0 GNU Emacs = 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22
= =C2=A0 on king, modified by Debian





=
In GNU Emacs 24.3.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10= )
=C2=A0of 2014-04-22 on newton
Windowing system distri= butor `The X.Org Foundation', version 11.0.11300000
System Description: = Ubuntu 12.04.4 LTS

Configured using:
=C2= =A0`configure --without-makeinfo'

Important se= ttings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-syst= em: utf-8-unix

Major mode: C/l

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2= =A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
<= div>=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode:= t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-m= ode: t
=C2=A0 transient-mark-mode: t
=C2=A0 abbrev-mode= : t

Recent input:
C-x C-f <M-backspace> <M-backspace> f &= lt;tab> <M-backspace>=C2=A0
a l <tab> f <tab>= ; <return> M-x t a g <backspace> <backspace>=C2=A0
<= div><backspace> C-g C-u M-x v i s i t - t a g s <tab> <retur= n>=C2=A0
<return> C-h v t a g s - f <tab> <return> M-. s t o= =C2=A0
p _ a l l _ m o <tab> <return> M-* C-h v M-p M= -p <return>=C2=A0
<help-echo> <down-mouse-2> &l= t;mouse-1> <help-echo> <down-mouse-1>=C2=A0
<mouse-1> q <down-mouse-1> <mouse-1> M-x r e p o r= =C2=A0
t <tab> <return>

Rece= nt messages:
For information about GNU Emacs and the GNU system, = type C-h C-a.
Quit
Starting a new list of tags tables
Type C-x 1= to delete the help window.
Making tags completion table for /hom= e/jarvis/Desktop/aluminum_puppeteer/TAGS...done
Mark set
=C2=A0[2 times]

Load-path shadows:
= None found.

Features:
(shadow sort gnus-= util mail-extr emacsbug message cl-macs gv format-spec
rfc822 mml= mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils pp help-mode help-fns etags ring vc-g= it
cc-langs cl cl-loaddefs cl-lib cc-mode cc-fonts easymenu cc-gu= ess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs time-dat= e
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type m= wheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe ta= bulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow time= r
select scroll-bar mouse jit-lock font-lock syntax facemenu font= -core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan= thai
tai-viet lao korean japanese hebrew greek romanian slovak czech europe= an
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-= hook help
simple abbrev minibuffer nadvice loaddefs button faces = cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mu= le
custom widget hashtable-print-readable backquote make-network-= process
dbusbind gfilenotify dynamic-setting system-font-setting<= /div>
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 110255 6347)=
=C2=A0(symbols 48 20801 0)
=C2=A0(miscs 40 54 210)
=C2=A0(strings 32 19268 4385)
=C2=A0(string-bytes 1 626660)
=
=C2=A0(vectors 16 12190)
=C2=A0(vector-slots 8 407628 5169)<= /div>
=C2=A0(floats 8 65 216)
=C2=A0(intervals 56 529 16)
=C2=A0(buffers 960 14)
=C2=A0(heap 1024 45108 661))

--089e0115f41a39e90b04f7b5e478-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 12:39:07 2015 Received: (at control) by debbugs.gnu.org; 9 Sep 2015 16:39:07 +0000 Received: from localhost ([127.0.0.1]:54093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZiOo-00082m-QS for submit@debbugs.gnu.org; Wed, 09 Sep 2015 12:39:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35269) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZiOm-00082c-Iq for control@debbugs.gnu.org; Wed, 09 Sep 2015 12:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZiOl-0008Da-IM for control@debbugs.gnu.org; Wed, 09 Sep 2015 12:39:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([208.118.235.10]:54885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZiOl-0008DJ-FN for control@debbugs.gnu.org; Wed, 09 Sep 2015 12:39:03 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZZiOl-0003MA-9M for control@debbugs.gnu.org; Wed, 09 Sep 2015 12:39:03 -0400 Subject: control message for bug 21443 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 09 Sep 2015 12:39:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.10 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) merge 17326 21443 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 11:54:08 2016 Received: (at control) by debbugs.gnu.org; 1 Dec 2016 16:54:08 +0000 Received: from localhost ([127.0.0.1]:48924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cCUca-0003DU-4e for submit@debbugs.gnu.org; Thu, 01 Dec 2016 11:54:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cCUcZ-0003DH-9W for control@debbugs.gnu.org; Thu, 01 Dec 2016 11:54:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCUcQ-0001DF-47 for control@debbugs.gnu.org; Thu, 01 Dec 2016 11:54:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCUcQ-0001DA-0v; Thu, 01 Dec 2016 11:53:58 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3783 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cCUcN-0005ub-4r; Thu, 01 Dec 2016 11:53:57 -0500 Date: Thu, 01 Dec 2016 18:53:48 +0200 Message-Id: <83fum7pp43.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: (message from Dmitry Gutov on Wed, 30 Nov 2016 03:12:20 +0200) Subject: Re: Bugs related to buffer-local tags-file-name References: <87zikr4a8y.fsf@gmail.com> <3f470a39-6bd4-bbb4-c693-ef889118fdf2@yandex.ru> <87wpfv3qrm.fsf@gmail.com> <838ts86atl.fsf@gnu.org> <83r3603t7o.fsf@gnu.org> <83twau1n0u.fsf@gnu.org> <87poli3ztj.fsf@gmail.com> <83polexkop.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.9 (-------) X-Debbugs-Envelope-To: control Cc: jschwab@gmail.com, emacs-devel@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.9 (-------) close 158 close 17326 close 23164 close 19741 thanks > Cc: emacs-devel@gnu.org > From: Dmitry Gutov > Date: Wed, 30 Nov 2016 03:12:20 +0200 > > On 29.11.2016 19:25, Eli Zaretskii wrote: > > > Dmitry, should I wait for your testing as well, or should I just push > > the changes? > > Yes, sorry. I think you should go ahead with them, maybe with some minor > tweaks. Done. > - In visit-tags-table-buffer's docstring, "optional arg CONT" should > probably be just "CONT", all three times. Fixed. > - More importantly, this patch contains a backward-incompatible change > to the tags-completion-table function. Maybe we should consider how to > make BUF an optional argument. It is optional now. > - It would be great if let-binding tags-table-list around > tags-lazy-completion-table didn't leak it to the global value either > (which happens with company-etags). Alas, this seems to be a harder task. Right, patches welcome. From unknown Sat Jun 21 05:15:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 30 Dec 2016 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator