Glenn Morris <rgm <at> gnu.org>
to control <at> emacsbugs.donarmstrong.com.
Full text available.Glenn Morris <rgm <at> gnu.org>
to control <at> emacsbugs.donarmstrong.com.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
HELO_LH_HOME,RDNS_DYNAMIC,VALID_BTS_CONTROL autolearn=ham
version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 158) by emacsbugs.donarmstrong.com; 30 May 2008 13:43:10 +0000
Received: from ceviche.home (206-248-174-248.dsl.teksavvy.com [206.248.174.248])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4UDh3od032361
for <158 <at> emacsbugs.donarmstrong.com>; Fri, 30 May 2008 06:43:04 -0700
Received: by ceviche.home (Postfix, from userid 20848)
id 6DA21B41E2; Fri, 30 May 2008 09:42:57 -0400 (EDT)
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Francesco Potorti` <pot <at> gnu.org>
Cc: 158 <at> debbugs.gnu.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Re: bug#158: Etags completion problem for local tags table
Message-ID: <jwvabi77vty.fsf-monnier+emacsbugreports <at> gnu.org>
References: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org>
<E1K1z83-00006l-9z <at> tucano.isti.cnr.it>
Date: Fri, 30 May 2008 09:42:57 -0400
In-Reply-To: <E1K1z83-00006l-9z <at> tucano.isti.cnr.it> (Francesco Potorti`'s
message of "Fri, 30 May 2008 09:34:23 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
owner 158
thanks
Sorry, I thought you were the maintainer of etags.el.
Stefan
Stefan Monnier <monnier <at> iro.umontreal.ca>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>:bug#158; Package emacs.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level:
X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
RCVD_IN_DNSWL_LOW,VALID_BTS_CONTROL autolearn=ham
version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 30 May 2008 13:43:10 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4UDh4w8032363
for <submit <at> emacsbugs.donarmstrong.com>; Fri, 30 May 2008 06:43:05 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
id 1K24sq-0006t1-4u
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:43:04 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
id 1K24sp-0006sp-OY
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:43:03 -0400
Received: from [199.232.76.173] (port=54456 helo=monty-python.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43)
id 1K24sp-0006sm-KN
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:43:03 -0400
Received: from 206-248-174-248.dsl.teksavvy.com ([206.248.174.248]:52027 helo=ceviche.home)
by monty-python.gnu.org with esmtp (Exim 4.60)
(envelope-from <monnier <at> iro.umontreal.ca>)
id 1K24sp-0007Tq-8e
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:43:03 -0400
Received: by ceviche.home (Postfix, from userid 20848)
id 6DA21B41E2; Fri, 30 May 2008 09:42:57 -0400 (EDT)
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Francesco Potorti` <pot <at> gnu.org>
Cc: 158 <at> debbugs.gnu.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Re: bug#158: Etags completion problem for local tags table
Message-ID: <jwvabi77vty.fsf-monnier+emacsbugreports <at> gnu.org>
References: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org>
<E1K1z83-00006l-9z <at> tucano.isti.cnr.it>
Date: Fri, 30 May 2008 09:42:57 -0400
In-Reply-To: <E1K1z83-00006l-9z <at> tucano.isti.cnr.it> (Francesco Potorti`'s
message of "Fri, 30 May 2008 09:34:23 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
X-CrossAssassin-Score: 2
owner 158
thanks
Sorry, I thought you were the maintainer of etags.el.
Stefan
Stefan Monnier <monnier <at> iro.umontreal.ca>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>:bug#158; Package emacs.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
HELO_LH_HOME,RDNS_DYNAMIC autolearn=no
version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 158) by emacsbugs.donarmstrong.com; 30 May 2008 13:39:56 +0000
Received: from ceviche.home (206-248-174-248.dsl.teksavvy.com [206.248.174.248])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4UDdmXA031169
for <158 <at> emacsbugs.donarmstrong.com>; Fri, 30 May 2008 06:39:49 -0700
Received: by ceviche.home (Postfix, from userid 20848)
id 0237DB41E2; Fri, 30 May 2008 09:39:48 -0400 (EDT)
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Francesco Potorti` <pot <at> gnu.org>
Cc: 158 <at> debbugs.gnu.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Re: bug#158: Etags completion problem for local tags table
Message-ID: <jwvfxrz7vyk.fsf-monnier+emacsbugreports <at> gnu.org>
References: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org>
<E1K1z83-00006l-9z <at> tucano.isti.cnr.it>
Date: Fri, 30 May 2008 09:39:47 -0400
In-Reply-To: <E1K1z83-00006l-9z <at> tucano.isti.cnr.it> (Francesco Potorti`'s
message of "Fri, 30 May 2008 09:34:23 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
> I am not sure what are "the other problems ... mentioned". Anyway,
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=158
Stefan
Stefan Monnier <monnier <at> iro.umontreal.ca>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>:bug#158; Package emacs.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level:
X-Spam-Status: No, score=-4.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 30 May 2008 13:39:59 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4UDdp6B031173
for <submit <at> emacsbugs.donarmstrong.com>; Fri, 30 May 2008 06:39:53 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
id 1K24pj-00062R-ET
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:39:51 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
id 1K24ph-00061i-Nx
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:39:50 -0400
Received: from [199.232.76.173] (port=48075 helo=monty-python.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43)
id 1K24ph-00061d-In
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:39:49 -0400
Received: from 206-248-174-248.dsl.teksavvy.com ([206.248.174.248]:45201 helo=ceviche.home)
by monty-python.gnu.org with esmtp (Exim 4.60)
(envelope-from <monnier <at> iro.umontreal.ca>)
id 1K24ph-0006Nf-7U
for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:39:49 -0400
Received: by ceviche.home (Postfix, from userid 20848)
id 0237DB41E2; Fri, 30 May 2008 09:39:48 -0400 (EDT)
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Francesco Potorti` <pot <at> gnu.org>
Cc: 158 <at> debbugs.gnu.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Re: bug#158: Etags completion problem for local tags table
Message-ID: <jwvfxrz7vyk.fsf-monnier+emacsbugreports <at> gnu.org>
References: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org>
<E1K1z83-00006l-9z <at> tucano.isti.cnr.it>
Date: Fri, 30 May 2008 09:39:47 -0400
In-Reply-To: <E1K1z83-00006l-9z <at> tucano.isti.cnr.it> (Francesco Potorti`'s
message of "Fri, 30 May 2008 09:34:23 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
X-CrossAssassin-Score: 2
> I am not sure what are "the other problems ... mentioned". Anyway,
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=158
Stefan
Stefan Monnier <monnier <at> iro.umontreal.ca>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>:bug#158; Package emacs.
Full text available.Received: (at unknown) by unknown; unknown X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 158) by emacsbugs.donarmstrong.com; 30 May 2008 07:35:29 +0000 Received: from ITANIUM.ISTI.CNR.IT (mx4.isti.cnr.it [194.119.192.6]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4U7ZPCP007090 for <158 <at> emacsbugs.donarmstrong.com>; Fri, 30 May 2008 00:35:26 -0700 Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.4-beta #31598) id <01MVE876LQPCAFY1EN <at> mx.isti.cnr.it> for 158 <at> emacsbugs.donarmstrong.com; Fri, 30 May 2008 09:34:23 +0200 Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.4-beta #31599) with ESMTPSA id <01MVE876AQYCAJKWP9 <at> mx.isti.cnr.it>; Fri, 30 May 2008 09:34:23 +0200 Received: from pot by tucano.isti.cnr.it with local (Exim 4.69) (envelope-from <pot <at> gnu.org>) id 1K1z83-00006l-9z; Fri, 30 May 2008 09:34:23 +0200 Date: Fri, 30 May 2008 09:34:23 +0200 From: Francesco Potorti` <pot <at> gnu.org> Subject: Re: bug#158: Etags completion problem for local tags table In-reply-to: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org> To: Stefan Monnier <monnier <at> iro.umontreal.ca>, 158 <at> debbugs.gnu.org Cc: Emacs Bugs <bug-gnu-emacs <at> gnu.org> Message-id: <E1K1z83-00006l-9z <at> tucano.isti.cnr.it> Organization: X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 References: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org> >> In (at least) emacs 22.1, completing reads for find-tag and list-tags >> will use the global tags table list even if a local tags file has >> been specified using a prefix argument for visit-tags-table. > >I believe this has already been fixed in the Emacs-23 CVS repository. >Could you check it? > >About the other problems you mentioned, I don't understand enough of >etags.el's handling of tags-table-list to know what is done on purpose, >what is a limitation, and what is a bug. Francesco? I am not sure what are "the other problems ... mentioned". Anyway, regarding the relationship between tags-file-name and tags-table-list, I always found it confusing. I see three documentation problems: First, the help for both variables says that if you set one, you should not set the other, which is not clear: should one set one or the other? Second, neither help mentions the visit-tags-table function, which I think should be the only way to set those variables interactively. Third, there is no single place where the relationships between the two variables are described.
Francesco Potorti` <pot <at> gnu.org>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>:bug#158; Package emacs.
Full text available.Received: (at unknown) by unknown; unknown X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 30 May 2008 07:35:39 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4U7ZZi4007097 for <submit <at> emacsbugs.donarmstrong.com>; Fri, 30 May 2008 00:35:37 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1z9D-0007Z1-7i for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 03:35:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1z9B-0007YH-Gn for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 03:35:34 -0400 Received: from [199.232.76.173] (port=44741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1z9B-0007YC-7D for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 03:35:33 -0400 Received: from mx20.gnu.org ([199.232.41.8]:50361) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <pot <at> gnu.org>) id 1K1z9A-0000cr-Vk for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 03:35:33 -0400 Received: from mx4.isti.cnr.it ([194.119.192.6] helo=ITANIUM.ISTI.CNR.IT) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from <pot <at> gnu.org>) id 1K1z9A-0007nE-6G for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 03:35:32 -0400 Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.4-beta #31598) id <01MVE876LQPCAFY1EN <at> mx.isti.cnr.it> for bug-gnu-emacs <at> gnu.org; Fri, 30 May 2008 09:34:23 +0200 Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.4-beta #31599) with ESMTPSA id <01MVE876AQYCAJKWP9 <at> mx.isti.cnr.it>; Fri, 30 May 2008 09:34:23 +0200 Received: from pot by tucano.isti.cnr.it with local (Exim 4.69) (envelope-from <pot <at> gnu.org>) id 1K1z83-00006l-9z; Fri, 30 May 2008 09:34:23 +0200 Date: Fri, 30 May 2008 09:34:23 +0200 From: Francesco Potorti` <pot <at> gnu.org> Subject: Re: bug#158: Etags completion problem for local tags table In-reply-to: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org> To: Stefan Monnier <monnier <at> iro.umontreal.ca>, 158 <at> debbugs.gnu.org Cc: Emacs Bugs <bug-gnu-emacs <at> gnu.org> Message-id: <E1K1z83-00006l-9z <at> tucano.isti.cnr.it> Organization: X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 References: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org> X-detected-kernel: by mx20.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 >> In (at least) emacs 22.1, completing reads for find-tag and list-tags >> will use the global tags table list even if a local tags file has >> been specified using a prefix argument for visit-tags-table. > >I believe this has already been fixed in the Emacs-23 CVS repository. >Could you check it? > >About the other problems you mentioned, I don't understand enough of >etags.el's handling of tags-table-list to know what is done on purpose, >what is a limitation, and what is a bug. Francesco? I am not sure what are "the other problems ... mentioned". Anyway, regarding the relationship between tags-file-name and tags-table-list, I always found it confusing. I see three documentation problems: First, the help for both variables says that if you set one, you should not set the other, which is not clear: should one set one or the other? Second, neither help mentions the visit-tags-table function, which I think should be the only way to set those variables interactively. Third, there is no single place where the relationships between the two variables are described.
Francesco Potorti` <pot <at> gnu.org>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>:bug#158; Package emacs.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level:
X-Spam-Status: No, score=0.7 required=4.0 tests=AWL,BAYES_00,FAKE_REPLY_C,
HELO_LH_HOME,RDNS_DYNAMIC autolearn=no
version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 158) by emacsbugs.donarmstrong.com; 29 May 2008 21:37:03 +0000
Received: from ceviche.home (206-248-174-248.dsl.teksavvy.com [206.248.174.248])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4TLb0pv021568
for <158 <at> emacsbugs.donarmstrong.com>; Thu, 29 May 2008 14:37:01 -0700
Received: by ceviche.home (Postfix, from userid 20848)
id A5F31B41E2; Thu, 29 May 2008 17:36:59 -0400 (EDT)
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 158 <at> debbugs.gnu.org
Subject: Re: Etags completion problem for local tags table
Message-ID: <jwvfxs0aj6k.fsf-monnier+emacsbugreports <at> gnu.org>
Date: Thu, 29 May 2008 17:36:59 -0400
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
> In (at least) emacs 22.1, completing reads for find-tag and list-tags
> will use the global tags table list even if a local tags file has
> been specified using a prefix argument for visit-tags-table.
I believe this has already been fixed in the Emacs-23 CVS repository.
Could you check it?
About the other problems you mentioned, I don't understand enough of
etags.el's handling of tags-table-list to know what is done on purpose,
what is a limitation, and what is a bug. Francesco?
Stefan
Stefan Monnier <monnier <at> iro.umontreal.ca>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Francesco Potorti <pot <at> gnu.org>:bug#158; Package emacs.
Full text available.Stefan Monnier <monnier <at> iro.umontreal.ca>
to control <at> emacsbugs.donarmstrong.com.
Full text available.Stefan Monnier <monnier <at> iro.umontreal.ca>
to control <at> emacsbugs.donarmstrong.com.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,FVGT_m_MULTI_ODD,
MURPHY_DRUGS_REL8 autolearn=no version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 158) by emacsbugs.donarmstrong.com; 30 Apr 2008 03:15:13 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m3U3F7Tu012983
for <158 <at> emacsbugs.donarmstrong.com>; Tue, 29 Apr 2008 20:15:08 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AgsEAE6BF0jO+JghdGdsb2JhbACBU499ASdTmlM
X-IronPort-AV: E=Sophos;i="4.25,725,1199682000";
d="scan'208";a="19619478"
Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238])
by ironport2-out.teksavvy.com with ESMTP; 29 Apr 2008 23:15:01 -0400
Received: from pastel.home ([206.248.152.33])
by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id KHT28901
for <158 <at> emacsbugs.donarmstrong.com>; Tue, 29 Apr 2008 23:15:01 -0400
Received: by pastel.home (Postfix, from userid 20848)
id EE91E81E8; Tue, 29 Apr 2008 23:15:00 -0400 (EDT)
Resent-Message-ID: <jwvr6co58zv.fsf-monnier+inbox <at> gnu.org>
Resent-To: 158 <at> debbugs.gnu.org
Resent-From: Stefan Monnier <monnier <at> iro.umontreal.ca>
Resent-Date: Tue, 29 Apr 2008 23:15:00 -0400
X-Original-To: monnier <at> iro.umontreal.ca
Received: from perlin.iro.umontreal.ca (perlin.iro.umontreal.ca [132.204.24.51])
by mercure.iro.umontreal.ca (Postfix) with ESMTP id C21312CFC27
for <monnier <at> iro.umontreal.ca>; Tue, 29 Apr 2008 16:11:27 -0400 (EDT)
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
by perlin.iro.umontreal.ca (Postfix) with ESMTP id 8566E14821A
for <monnier <at> iro.umontreal.ca>; Tue, 29 Apr 2008 16:11:19 -0400 (EDT)
Received: from localhost ([127.0.0.1]:39853 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43)
id 1JqwAZ-0003LM-6o
for monnier <at> iro.umontreal.ca; Tue, 29 Apr 2008 16:11:19 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
id 1JqwAN-0003JC-Px
for bug-gnu-emacs <at> gnu.org; Tue, 29 Apr 2008 16:11:07 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
id 1JqwAN-0003HJ-Cd
for bug-gnu-emacs <at> gnu.org; Tue, 29 Apr 2008 16:11:07 -0400
Received: from [199.232.76.173] (port=55045 helo=monty-python.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43) id 1JqwAM-0003Gz-Pl
for bug-gnu-emacs <at> gnu.org; Tue, 29 Apr 2008 16:11:06 -0400
Received: from moderators.individual.net ([130.133.4.7])
by monty-python.gnu.org with esmtp (Exim 4.60)
(envelope-from <mod-submit <at> uni-berlin.de>) id 1JqwAM-0007r9-1l
for bug-gnu-emacs <at> gnu.org; Tue, 29 Apr 2008 16:11:06 -0400
Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66])
by moderators.individual.net (Exim 4.69)
for gnu-emacs-bug <at> moderators.individual.net with esmtp
(envelope-from <mod-submit <at> uni-berlin.de>)
id <1JqwAK-0004gQ-Jw>; Tue, 29 Apr 2008 22:11:04 +0200
Received: from relay1.zedat.fu-berlin.de ([130.133.4.67])
by outpost1.zedat.fu-berlin.de (Exim 4.69)
for gnu-emacs-bug <at> moderators.individual.net with esmtp
(envelope-from <mod-submit <at> uni-berlin.de>)
id <1JqwAK-0003Ym-J9>; Tue, 29 Apr 2008 22:11:04 +0200
Received: from curry.zedat.fu-berlin.de ([130.133.1.2])
by relay1.zedat.fu-berlin.de (Exim 4.69)
for gnu-emacs-bug <at> moderators.individual.net with esmtp
(envelope-from <mod-submit <at> uni-berlin.de>)
id <1JqwAK-0003B8-ID>; Tue, 29 Apr 2008 22:11:04 +0200
Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98)
from news.uni-berlin.de with bsmtp
id <m1JqwAK-01TG7uC>; Tue, 29 Apr 2008 22:11:04 +0200 (MEST)
To: gnu-emacs-bug <at> moderators.individual.net
Path: individual.net!not-for-mail
From: Radey Shouman <shouman <at> comcast.net>
Newsgroups: gnu.emacs.bug
Date: 29 Apr 2008 16:08:56 -0400
Organization: None of the above
Lines: 222
Message-ID: <87y76wwhif.fsf <at> comcast.net>
References: <mailman.7663.1203474863.18990.bug-gnu-emacs <at> gnu.org>
<mailman.10789.1209074215.18990.bug-gnu-emacs <at> gnu.org>
X-Orig-X-Trace: individual.net
E1oHfNw9e4IYGYB09IKYWA5lkuPne5y4m7oE2qUHSsbpia7LKB
Cancel-Lock: sha1:DR+xkb17860KE2MP3gRABH1CEx0=
X-Newsreader: Gnus v5.7/Emacs 20.7
X-Originating-IP: 130.133.1.2
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
Cc:
Subject: Re: Etags completion problem for local tags table
X-BeenThere: bug-gnu-emacs <at> gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
<mailto:bug-gnu-emacs-request <at> gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs <at> gnu.org>
List-Help: <mailto:bug-gnu-emacs-request <at> gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
<mailto:bug-gnu-emacs-request <at> gnu.org?subject=subscribe>
Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca <at> gnu.org
Errors-To: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca <at> gnu.org
X-DIRO-MailScanner-Information: Please contact the ISP for more information
X-DIRO-MailScanner: Found to be clean
X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel,
SpamAssassin (score=-1.94, requis 5, BAYES_00 -2.60,
RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00)
X-DIRO-MailScanner-From: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca <at> gnu.org
Posted-To: gnu.emacs.bug
The following message is a courtesy copy of an article
that has been posted to gnu.emacs.bug as well.
Radey Shouman <shouman <at> comcast.net> writes:
> Radey Shouman <shouman <at> comcast.net> writes:
>
> > In (at least) emacs 22.1, completing reads for find-tag and list-tags
> > will use the global tags table list even if a local tags file has
> > been specified using a prefix argument for visit-tags-table.
> >
> > To reproduce, visit two files, in the first buffer visit a tags file
> > globally, in the second a different tags file locally. From the
> > second buffer, try M.[TAB] . The tag list displayed will correspond
> > to the first, globally visited, tags file.
>
> The patch presented earlier had problems - the root issue is that
> variables tags-file-name and tags-table-list are used for returning
> information from functions which may change the current buffer.
>
> One manifestation of the problem can be seen by setting a local tags
> file using C-uM-x visit-tags-table twice in the same buffer. The
> second attempt will fail to set a local tags table, but will set the
> global tags table.
>
> This patch also modifies visit-tags-table so that it will remove a
> local tags table if present in the buffer in which it is called to set
> a global tags table. This is arguably not a bug fix, but seems much
> less suprising than the current behavior.
Yet another patch, this one additionally fixes tags-query-replace and
other users of next-file. The current etags.el fails when using
tags-query-replace with buffer-local tags tables (expand-file is
called with an argument of nil).
*** /local/emacs/emacs-22.1/lisp/progmodes/etags.el.dist 2007-01-21 03:20:46.000000000 -0500
--- etags.el 2008-04-28 15:05:35.044759300 -0400
***************
*** 257,262 ****
--- 257,264 ----
"Function to do the work of `tags-included-tables' (which see).")
(defvar verify-tags-table-function nil
"Function to return t iff current buffer contains valid tags file.")
+ (defvar etags-calling-buffer nil
+ "Buffer from which a completing read was made, so we can determine the appropriate tags file to visit.")
;; Initialize the tags table in the current buffer.
;; Returns non-nil iff it is a valid tags table. On
***************
*** 305,323 ****
;; Calling visit-tags-table-buffer with tags-file-name set to FILE will
;; initialize a buffer for FILE and set tags-file-name to the
;; fully-expanded name.
! (let ((tags-file-name file))
! (save-excursion
! (or (visit-tags-table-buffer file)
! (signal 'file-error (list "Visiting tags table"
! "file does not exist"
! file)))
! ;; Set FILE to the expanded name.
! (setq file tags-file-name)))
! (if local
! ;; Set the local value of tags-file-name.
! (set (make-local-variable 'tags-file-name) file)
! ;; Set the global value of tags-file-name.
! (setq-default tags-file-name file)))
(defun tags-table-check-computed-list ()
"Compute `tags-table-computed-list' from `tags-table-list' if necessary."
--- 307,335 ----
;; Calling visit-tags-table-buffer with tags-file-name set to FILE will
;; initialize a buffer for FILE and set tags-file-name to the
;; fully-expanded name.
! (let (table-list)
! (let ((tags-file-name file)
! (tags-table-list tags-table-list))
! (save-excursion
! (or (visit-tags-table-buffer file)
! (signal 'file-error (list "Visiting tags table"
! "file does not exist"
! file))))
! ;; Set FILE to the expanded name. Note that we have to do this from the original
! ;; buffer, in case tags-file-name or tags-table-list are buffer-local.
! (setq file tags-file-name
! table-list tags-table-list))
!
! (if local
! ;; Set the local value of tags-file-name.
! (progn
! (set (make-local-variable 'tags-file-name) file)
! (set (make-local-variable 'tags-table-list) table-list))
! ;; Set the global value of tags-file-name.
! (kill-local-variable 'tags-file-name)
! (kill-local-variable 'tags-table-list)
! (setq tags-file-name file
! tags-table-list table-list))))
(defun tags-table-check-computed-list ()
"Compute `tags-table-computed-list' from `tags-table-list' if necessary."
***************
*** 444,459 ****
(revert-buffer t t)
(tags-table-mode)))
(and (file-exists-p file)
! (progn
(set-buffer (find-file-noselect file))
(or (string= file buffer-file-name)
;; find-file-noselect has changed the file name.
;; Propagate the change to tags-file-name and tags-table-list.
! (let ((tail (member file tags-table-list)))
! (if tail
! (setcar tail buffer-file-name))
! (if (eq file tags-file-name)
! (setq tags-file-name buffer-file-name))))
(tags-table-mode)))))
;; Subroutine of visit-tags-table-buffer. Search the current tags tables
--- 456,475 ----
(revert-buffer t t)
(tags-table-mode)))
(and (file-exists-p file)
! (let ((obuf (current-buffer)))
(set-buffer (find-file-noselect file))
(or (string= file buffer-file-name)
;; find-file-noselect has changed the file name.
;; Propagate the change to tags-file-name and tags-table-list.
! ;; We have to do this in the buffer current when we were called
! ;; because tags-table-list and tags-file-name may be buffer local.
! (save-excursion
! (set-buffer obuf)
! (let ((tail (member file tags-table-list)))
! (if tail
! (setcar tail buffer-file-name))
! (if (eq file tags-file-name)
! (setq tags-file-name buffer-file-name)))))
(tags-table-mode)))))
;; Subroutine of visit-tags-table-buffer. Search the current tags tables
***************
*** 538,543 ****
--- 554,564 ----
`tags-file-name', `tags-table-list', `tags-table-list-pointer'.
Returns t if it visits a tags table, or nil if there are no more in the list."
+ ;; We may be called from a minibuffer if invoked during completion.
+ ;; this can be a problem when the tags tables are buffer-local.
+ (if etags-calling-buffer
+ (set-buffer etags-calling-buffer))
+
;; Set tags-file-name to the tags table file we want to visit.
(cond ((eq cont 'same)
;; Use the ambient value of tags-file-name.
***************
*** 781,787 ****
;; Read a tag name from the minibuffer with defaulting and completion.
(defun find-tag-tag (string)
! (let* ((completion-ignore-case (if (memq tags-case-fold-search '(t nil))
tags-case-fold-search
case-fold-search))
(default (funcall (or find-tag-default-function
--- 802,809 ----
;; Read a tag name from the minibuffer with defaulting and completion.
(defun find-tag-tag (string)
! (let* ((etags-calling-buffer (current-buffer))
! (completion-ignore-case (if (memq tags-case-fold-search '(t nil))
tags-case-fold-search
case-fold-search))
(default (funcall (or find-tag-default-function
***************
*** 1658,1682 ****
((eq initialize t)
;; Initialize the list from the tags table.
(save-excursion
! ;; Visit the tags table buffer to get its list of files.
! (visit-tags-table-buffer)
! ;; Copy the list so we can setcdr below, and expand the file
! ;; names while we are at it, in this buffer's default directory.
! (setq next-file-list (mapcar 'expand-file-name (tags-table-files)))
! ;; Iterate over all the tags table files, collecting
! ;; a complete list of referenced file names.
! (while (visit-tags-table-buffer t)
! ;; Find the tail of the working list and chain on the new
! ;; sublist for this tags table.
! (let ((tail next-file-list))
! (while (cdr tail)
! (setq tail (cdr tail)))
! ;; Use a copy so the next loop iteration will not modify the
! ;; list later returned by (tags-table-files).
! (if tail
! (setcdr tail (mapcar 'expand-file-name (tags-table-files)))
! (setq next-file-list (mapcar 'expand-file-name
! (tags-table-files))))))))
(t
;; Initialize the list by evalling the argument.
(setq next-file-list (eval initialize))))
--- 1680,1705 ----
((eq initialize t)
;; Initialize the list from the tags table.
(save-excursion
! (let ((etags-calling-buffer (current-buffer)))
! ;; Visit the tags table buffer to get its list of files.
! (visit-tags-table-buffer)
! ;; Copy the list so we can setcdr below, and expand the file
! ;; names while we are at it, in this buffer's default directory.
! (setq next-file-list (mapcar 'expand-file-name (tags-table-files)))
! ;; Iterate over all the tags table files, collecting
! ;; a complete list of referenced file names.
! (while (visit-tags-table-buffer t)
! ;; Find the tail of the working list and chain on the new
! ;; sublist for this tags table.
! (let ((tail next-file-list))
! (while (cdr tail)
! (setq tail (cdr tail)))
! ;; Use a copy so the next loop iteration will not modify the
! ;; list later returned by (tags-table-files).
! (if tail
! (setcdr tail (mapcar 'expand-file-name (tags-table-files)))
! (setq next-file-list (mapcar 'expand-file-name
! (tags-table-files)))))))))
(t
;; Initialize the list by evalling the argument.
(setq next-file-list (eval initialize))))
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:bug#158; Package emacs.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,FVGT_m_MULTI_ODD,
MURPHY_DRUGS_REL8 autolearn=no version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 158) by emacsbugs.donarmstrong.com; 25 Apr 2008 03:53:07 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m3P3qxgn005952
for <158 <at> emacsbugs.donarmstrong.com>; Thu, 24 Apr 2008 20:53:00 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApwEAPLyEEhMCpew/2dsb2JhbACBUpB/mjQ
X-IronPort-AV: E=Sophos;i="4.25,706,1199682000";
d="scan'208";a="19073057"
Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238])
by ironport2-out.teksavvy.com with ESMTP; 24 Apr 2008 23:52:53 -0400
Received: from pastel.home ([76.10.151.176])
by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id FHZ16153
for <158 <at> emacsbugs.donarmstrong.com>; Thu, 24 Apr 2008 23:52:53 -0400
Received: by pastel.home (Postfix, from userid 20848)
id 4B70E8064; Thu, 24 Apr 2008 23:52:53 -0400 (EDT)
Resent-Message-ID: <jwvfxtar3oq.fsf-monnier+emacs <at> gnu.org>
Resent-To: 158 <at> debbugs.gnu.org
Resent-From: Stefan Monnier <monnier <at> iro.umontreal.ca>
Resent-Date: Thu, 24 Apr 2008 23:52:53 -0400
X-Original-To: monnier <at> iro.umontreal.ca
Received: from pinpin.iro.umontreal.ca (pinpin.iro.umontreal.ca [132.204.24.52])
by mercure.iro.umontreal.ca (Postfix) with ESMTP id A3AB62CF820
for <monnier <at> iro.umontreal.ca>; Thu, 24 Apr 2008 17:57:11 -0400 (EDT)
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
by pinpin.iro.umontreal.ca (Postfix) with ESMTP id 684093B8B64
for <monnier <at> iro.umontreal.ca>; Thu, 24 Apr 2008 17:57:05 -0400 (EDT)
Received: from localhost ([127.0.0.1]:60287 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43)
id 1Jp9RB-0003Bm-SF
for monnier <at> iro.umontreal.ca; Thu, 24 Apr 2008 17:57:05 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
id 1Jp6lh-0000fn-1s
for bug-gnu-emacs <at> gnu.org; Thu, 24 Apr 2008 15:06:05 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
id 1Jp6le-0000fT-Fu
for bug-gnu-emacs <at> gnu.org; Thu, 24 Apr 2008 15:06:04 -0400
Received: from [199.232.76.173] (port=48582 helo=monty-python.gnu.org)
by lists.gnu.org with esmtp (Exim 4.43) id 1Jp6le-0000fQ-9o
for bug-gnu-emacs <at> gnu.org; Thu, 24 Apr 2008 15:06:02 -0400
Received: from moderators.individual.net ([130.133.4.7])
by monty-python.gnu.org with esmtp (Exim 4.60)
(envelope-from <mod-submit <at> uni-berlin.de>) id 1Jp6ld-00020I-I5
for bug-gnu-emacs <at> gnu.org; Thu, 24 Apr 2008 15:06:01 -0400
Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66])
by moderators.individual.net (Exim 4.69)
for gnu-emacs-bug <at> moderators.individual.net with esmtp
(envelope-from <mod-submit <at> uni-berlin.de>)
id <1Jp6lb-0005gH-TE>; Thu, 24 Apr 2008 21:05:59 +0200
Received: from relay1.zedat.fu-berlin.de ([130.133.4.67])
by outpost1.zedat.fu-berlin.de (Exim 4.69)
for gnu-emacs-bug <at> moderators.individual.net with esmtp
(envelope-from <mod-submit <at> uni-berlin.de>)
id <1Jp6lb-00083q-SU>; Thu, 24 Apr 2008 21:05:59 +0200
Received: from curry.zedat.fu-berlin.de ([130.133.1.2])
by relay1.zedat.fu-berlin.de (Exim 4.69)
for gnu-emacs-bug <at> moderators.individual.net with esmtp
(envelope-from <mod-submit <at> uni-berlin.de>)
id <1Jp6lb-0007a3-Ra>; Thu, 24 Apr 2008 21:05:59 +0200
Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98)
from news.uni-berlin.de with bsmtp
id <m1Jp6lb-01TG7pC>; Thu, 24 Apr 2008 21:05:59 +0200 (MEST)
To: gnu-emacs-bug <at> moderators.individual.net
Path: individual.net!not-for-mail
From: Radey Shouman <shouman <at> comcast.net>
Newsgroups: gnu.emacs.bug
Date: 24 Apr 2008 15:03:19 -0400
Organization: None of the above
Lines: 160
Message-ID: <87od7zxeh4.fsf <at> comcast.net>
References: <mailman.7663.1203474863.18990.bug-gnu-emacs <at> gnu.org>
X-Orig-X-Trace: individual.net
/N7WZtIM+7GAYLhlB55L7QJFegX5fpD4H8Mm0CZ4aekSE0ZI8p
Cancel-Lock: sha1:Ig/GBCV4ygDC6vbfe2Orj4xJEmA=
X-Newsreader: Gnus v5.7/Emacs 20.7
X-Originating-IP: 130.133.1.2
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
X-Mailman-Approved-At: Thu, 24 Apr 2008 17:56:53 -0400
Cc:
Subject: Re: Etags completion problem for local tags table
X-BeenThere: bug-gnu-emacs <at> gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
<mailto:bug-gnu-emacs-request <at> gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs <at> gnu.org>
List-Help: <mailto:bug-gnu-emacs-request <at> gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
<mailto:bug-gnu-emacs-request <at> gnu.org?subject=subscribe>
Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca <at> gnu.org
Errors-To: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca <at> gnu.org
X-DIRO-MailScanner-Information: Please contact the ISP for more information
X-DIRO-MailScanner: Found to be clean
X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel,
SpamAssassin (score=-1.94, requis 5, BAYES_00 -2.60,
RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00)
X-DIRO-MailScanner-From: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca <at> gnu.org
Posted-To: gnu.emacs.bug
The following message is a courtesy copy of an article
that has been posted to gnu.emacs.bug as well.
Radey Shouman <shouman <at> comcast.net> writes:
> In (at least) emacs 22.1, completing reads for find-tag and list-tags
> will use the global tags table list even if a local tags file has
> been specified using a prefix argument for visit-tags-table.
>
> To reproduce, visit two files, in the first buffer visit a tags file
> globally, in the second a different tags file locally. From the
> second buffer, try M.[TAB] . The tag list displayed will correspond
> to the first, globally visited, tags file.
The patch presented earlier had problems - the root issue is that
variables tags-file-name and tags-table-list are used for returning
information from functions which may change the current buffer.
One manifestation of the problem can be seen by setting a local tags
file using C-uM-x visit-tags-table twice in the same buffer. The
second attempt will fail to set a local tags table, but will set the
global tags table.
This patch also modifies visit-tags-table so that it will remove a
local tags table if present in the buffer in which it is called to set
a global tags table. This is arguably not a bug fix, but seems much
less suprising than the current behavior.
*** etags.el.dist 2007-01-21 03:20:46.000000000 -0500
--- etags.el 2008-04-24 09:57:37.660821100 -0400
***************
*** 257,262 ****
--- 257,264 ----
"Function to do the work of `tags-included-tables' (which see).")
(defvar verify-tags-table-function nil
"Function to return t iff current buffer contains valid tags file.")
+ (defvar etags-calling-buffer nil
+ "Buffer from which a completing read was made, so we can determine the appropriate tags file to visit.")
;; Initialize the tags table in the current buffer.
;; Returns non-nil iff it is a valid tags table. On
***************
*** 305,323 ****
;; Calling visit-tags-table-buffer with tags-file-name set to FILE will
;; initialize a buffer for FILE and set tags-file-name to the
;; fully-expanded name.
! (let ((tags-file-name file))
(save-excursion
(or (visit-tags-table-buffer file)
(signal 'file-error (list "Visiting tags table"
"file does not exist"
! file)))
! ;; Set FILE to the expanded name.
! (setq file tags-file-name)))
(if local
;; Set the local value of tags-file-name.
(set (make-local-variable 'tags-file-name) file)
;; Set the global value of tags-file-name.
! (setq-default tags-file-name file)))
(defun tags-table-check-computed-list ()
"Compute `tags-table-computed-list' from `tags-table-list' if necessary."
--- 307,335 ----
;; Calling visit-tags-table-buffer with tags-file-name set to FILE will
;; initialize a buffer for FILE and set tags-file-name to the
;; fully-expanded name.
! (let (table-list)
! (let ((tags-file-name file)
! (tags-table-list tags-table-list))
(save-excursion
(or (visit-tags-table-buffer file)
(signal 'file-error (list "Visiting tags table"
"file does not exist"
! file))))
! ;; Set FILE to the expanded name. Note that we have to do this from the original
! ;; buffer, in case tags-file-name or tags-table-list are buffer-local.
! (setq file tags-file-name
! table-list tags-table-list))
!
(if local
;; Set the local value of tags-file-name.
+ (progn
(set (make-local-variable 'tags-file-name) file)
+ (set (make-local-variable 'tags-table-list) table-list))
;; Set the global value of tags-file-name.
! (kill-local-variable 'tags-file-name)
! (kill-local-variable 'tags-table-list)
! (setq tags-file-name file
! tags-table-list table-list))))
(defun tags-table-check-computed-list ()
"Compute `tags-table-computed-list' from `tags-table-list' if necessary."
***************
*** 444,459 ****
(revert-buffer t t)
(tags-table-mode)))
(and (file-exists-p file)
! (progn
(set-buffer (find-file-noselect file))
(or (string= file buffer-file-name)
;; find-file-noselect has changed the file name.
;; Propagate the change to tags-file-name and tags-table-list.
(let ((tail (member file tags-table-list)))
(if tail
(setcar tail buffer-file-name))
(if (eq file tags-file-name)
! (setq tags-file-name buffer-file-name))))
(tags-table-mode)))))
;; Subroutine of visit-tags-table-buffer. Search the current tags tables
--- 456,475 ----
(revert-buffer t t)
(tags-table-mode)))
(and (file-exists-p file)
! (let ((obuf (current-buffer)))
(set-buffer (find-file-noselect file))
(or (string= file buffer-file-name)
;; find-file-noselect has changed the file name.
;; Propagate the change to tags-file-name and tags-table-list.
+ ;; We have to do this in the buffer current when we were called
+ ;; because tags-table-list and tags-file-name may be buffer local.
+ (save-excursion
+ (set-buffer obuf)
(let ((tail (member file tags-table-list)))
(if tail
(setcar tail buffer-file-name))
(if (eq file tags-file-name)
! (setq tags-file-name buffer-file-name)))))
(tags-table-mode)))))
;; Subroutine of visit-tags-table-buffer. Search the current tags tables
***************
*** 538,543 ****
--- 554,564 ----
`tags-file-name', `tags-table-list', `tags-table-list-pointer'.
Returns t if it visits a tags table, or nil if there are no more in the list."
+ ;; We may be called from a minibuffer if invoked during completion.
+ ;; this can be a problem when the tags tables are buffer-local.
+ (if etags-calling-buffer
+ (set-buffer etags-calling-buffer))
+
;; Set tags-file-name to the tags table file we want to visit.
(cond ((eq cont 'same)
;; Use the ambient value of tags-file-name.
***************
*** 781,787 ****
;; Read a tag name from the minibuffer with defaulting and completion.
(defun find-tag-tag (string)
! (let* ((completion-ignore-case (if (memq tags-case-fold-search '(t nil))
tags-case-fold-search
case-fold-search))
(default (funcall (or find-tag-default-function
--- 802,809 ----
;; Read a tag name from the minibuffer with defaulting and completion.
(defun find-tag-tag (string)
! (let* ((etags-calling-buffer (current-buffer))
! (completion-ignore-case (if (memq tags-case-fold-search '(t nil))
tags-case-fold-search
case-fold-search))
(default (funcall (or find-tag-default-function
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:bug#158; Package emacs.
Full text available.
Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: ***
X-Spam-Status: No, score=3.4 required=4.0 tests=FVGT_m_MULTI_ODD,HEADER_SPAM,
MURPHY_DRUGS_REL8 autolearn=no version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 25 Apr 2008 02:28:40 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m3P2SZcu013503
for <submit <at> emacsbugs.donarmstrong.com>; Thu, 24 Apr 2008 19:28:37 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApsEAAbfEEhMCpew/2dsb2JhbACBUqtT
X-IronPort-AV: E=Sophos;i="4.25,706,1199682000";
d="scan'";a="19058599"
Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238])
by ironport2-out.teksavvy.com with ESMTP; 24 Apr 2008 22:28:30 -0400
Received: from pastel.home ([76.10.151.176])
by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id FGB95929
for <submit <at> emacsbugs.donarmstrong.com>; Thu, 24 Apr 2008 22:28:29 -0400
Received: by pastel.home (Postfix, from userid 20848)
id 169A68064; Thu, 24 Apr 2008 22:28:30 -0400 (EDT)
Resent-Message-ID: <jwvfxtasm5t.fsf-monnier+emacs <at> gnu.org>
Resent-To: submit <at> debbugs.gnu.org
Resent-From: Stefan Monnier <monnier <at> iro.umontreal.ca>
Resent-Date: Thu, 24 Apr 2008 22:28:30 -0400
Path: beE1!out02b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!individual.net!not-for-mail
From: Radey Shouman <shouman <at> comcast.net>
Newsgroups: gnu.emacs.bug
Subject: Etags completion problem for local tags table
Date: 19 Feb 2008 18:27:29 -0500
Organization: None of the above
Lines: 96
Sender: nobody <at> nowhere.org
Approved: bug-gnu-emacs <at> gnu.org
Message-ID: <mailman.7663.1203474863.18990.bug-gnu-emacs <at> gnu.org>
NNTP-Posting-Host: lists.gnu.org
X-Trace: news.Stanford.EDU 1203474863 28173 199.232.76.165 (20 Feb 2008 02:34:23 GMT)
X-Complaints-To: news <at> news.stanford.edu
To: gnu-emacs-bug <at> moderators.individual.net
Envelope-to: bug-gnu-emacs <at> gnu.org
X-Orig-X-Trace: individual.net
MHf4pQl2eObO/HLoH7pgrgbI0pYuUaUxuHjliryIZtv7qPNsPj
Cancel-Lock: sha1:vPbOmu+Ds+vsIUn116kJ1toADbM=
X-Newsreader: Gnus v5.7/Emacs 20.7
X-Originating-IP: 130.133.1.2
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
X-Mailman-Approved-At: Tue, 19 Feb 2008 21:34:21 -0500
X-BeenThere: bug-gnu-emacs <at> gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
<mailto:bug-gnu-emacs-request <at> gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs <at> gnu.org>
List-Help: <mailto:bug-gnu-emacs-request <at> gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
<mailto:bug-gnu-emacs-request <at> gnu.org?subject=subscribe>
X-Received-Date: Tue, 19 Feb 2008 21:40:03 EST (beE1)
Posted-To: gnu.emacs.bug
The following message is a courtesy copy of an article
that has been posted to gnu.emacs.bug as well.
In (at least) emacs 22.1, completing reads for find-tag and list-tags
will use the global tags table list even if a local tags file has
been specified using a prefix argument for visit-tags-table.
To reproduce, visit two files, in the first buffer visit a tags file
globally, in the second a different tags file locally. From the
second buffer, try M.[TAB] . The tag list displayed will correspond
to the first, globally visited, tags file.
A patch that works for me is appended.
*** etags.el.dist 2007-01-21 03:20:46.000000000 -0500
--- etags.el 2008-02-19 17:46:44.592353300 -0500
***************
*** 257,262 ****
--- 257,264 ----
"Function to do the work of `tags-included-tables' (which see).")
(defvar verify-tags-table-function nil
"Function to return t iff current buffer contains valid tags file.")
+ (defvar etags-calling-buffer nil
+ "Buffer from which a completing read was made, so we can determine the appropriate tags file to visit.")
;; Initialize the tags table in the current buffer.
;; Returns non-nil iff it is a valid tags table. On
***************
*** 315,321 ****
(setq file tags-file-name)))
(if local
;; Set the local value of tags-file-name.
! (set (make-local-variable 'tags-file-name) file)
;; Set the global value of tags-file-name.
(setq-default tags-file-name file)))
--- 317,325 ----
(setq file tags-file-name)))
(if local
;; Set the local value of tags-file-name.
! (progn
! (set (make-local-variable 'tags-file-name) file)
! (set (make-local-variable 'tags-table-list) nil))
;; Set the global value of tags-file-name.
(setq-default tags-file-name file)))
***************
*** 751,756 ****
--- 755,762 ----
(let (current-table combined-table)
(message "Making tags completion table for %s..." buffer-file-name)
(save-excursion
+ (if etags-calling-buffer
+ (set-buffer etags-calling-buffer))
;; Iterate over the current list of tags tables.
(while (visit-tags-table-buffer (and combined-table t))
;; Find possible completions in this table.
***************
*** 772,777 ****
--- 778,785 ----
;; but builds tags-completion-table on demand.
(defun tags-complete-tag (string predicate what)
(save-excursion
+ (if etags-calling-buffer
+ (set-buffer etags-calling-buffer))
;; If we need to ask for the tag table, allow that.
(let ((enable-recursive-minibuffers t))
(visit-tags-table-buffer))
***************
*** 781,787 ****
;; Read a tag name from the minibuffer with defaulting and completion.
(defun find-tag-tag (string)
! (let* ((completion-ignore-case (if (memq tags-case-fold-search '(t nil))
tags-case-fold-search
case-fold-search))
(default (funcall (or find-tag-default-function
--- 789,796 ----
;; Read a tag name from the minibuffer with defaulting and completion.
(defun find-tag-tag (string)
! (let* ((etags-calling-buffer (current-buffer))
! (completion-ignore-case (if (memq tags-case-fold-search '(t nil))
tags-case-fold-search
case-fold-search))
(default (funcall (or find-tag-default-function
***************
*** 1834,1839 ****
--- 1843,1850 ----
(defun tags-complete-tags-table-file (string predicate what)
(save-excursion
+ (if etags-calling-buffer
+ (set-buffer etags-calling-buffer))
;; If we need to ask for the tag table, allow that.
(let ((enable-recursive-minibuffers t))
(visit-tags-table-buffer))
Radey Shouman <shouman <at> comcast.net>:Emacs Bugs <bug-gnu-emacs <at> gnu.org>.
Full text available.bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:bug#158; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.