From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.bugs Subject: bug#44494: etags.el xref-location-marker does not handle TAGS references to .el.gz files Date: Sat, 7 Nov 2020 11:09:49 -0500 Message-ID: References: <1cdac9f7-8340-83eb-f619-583e028e6e23@yandex.ru> <83wnyx7g0u.fsf@gnu.org> <838sbd6xn1.fsf@gnu.org> <834km16u5w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000aaf4eb05b3868f54" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33873"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44494@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 17:11:25 2020 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 1kbQoG-0008i5-1F for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 17:11:24 +0100 Original-Received: from localhost ([::1]:42296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbQoF-0007Jq-3E for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 11:11:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbQnv-0007Jh-1c for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 11:11:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbQnu-0006I8-M8 for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 11:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbQnu-0001am-HU for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 11:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Rouleau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2020 16:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44494 X-GNU-PR-Package: emacs Original-Received: via spool by 44494-submit@debbugs.gnu.org id=B44494.16047654096055 (code B ref 44494); Sat, 07 Nov 2020 16:11:02 +0000 Original-Received: (at 44494) by debbugs.gnu.org; 7 Nov 2020 16:10:09 +0000 Original-Received: from localhost ([127.0.0.1]:59143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbQn2-0001Za-TT for submit@debbugs.gnu.org; Sat, 07 Nov 2020 11:10:09 -0500 Original-Received: from mail-lf1-f44.google.com ([209.85.167.44]:33372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbQn0-0001Yp-Qe for 44494@debbugs.gnu.org; Sat, 07 Nov 2020 11:10:07 -0500 Original-Received: by mail-lf1-f44.google.com with SMTP id l2so6233264lfk.0 for <44494@debbugs.gnu.org>; Sat, 07 Nov 2020 08:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l82kqRh37R1cxHSRT/Ulipq8A0ZWUXS5tc/XnWCykns=; b=T6D/DEA1sTPqORP8dZU/jSuVdHkxnDJeXNR78VaKdyID1DSbzD5XvjzwXi6ms/Zq2G +yUqhB5LcomSfrFQBIVo0hzhK4BYZpJ4lIxqJp8bw4SmL6kZRgm6k3AP8GW3+6VvS/3i MBxhsjD/5zlkbXyleVSnitIqnSxTBNshGFdxbRVCqizEKr3BPMoUaWJ6d99PK+H1dZAl xNNmvcW8IGoI0WlllscGVoeCRi7b2bBxAy2dwNhqzy1L1ifLiE7K1jKDl0HzrtIZSjlf cMdEa5jE3dvSdZJ9bxe0UBWZ7YRpwrwzNHitdMXzOJSUmnBJp3Rd8S+XUYZwaDCnjUQZ LJTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l82kqRh37R1cxHSRT/Ulipq8A0ZWUXS5tc/XnWCykns=; b=PvUdst++4vZrDZLMmGBPx01duAnXywAln+g4mUwiVViv0Wi6j/vcGFdIVTgG3Bg9tl o0RmFDzykKomTBDaPF54zYhVAYmDqGF6TdPrpQCQRwL4zqJVRAN/Kr8cgUSffWXeeoMR 94fw0YVSUAAQIaUYINLyDM8sV/nabW2ammzEaqdpCY82KyWINRUCCYBDDQoLoNuyP2Uf 5VAzN0rt3kxibvQYqOH0EDeat4F8oRKcdIhY8EHLe7oephd7akdNrvqg2j8CYz0DSC0t Ld4Re+fP3MORSPcvNd3lgaJrTC+A8Ry8L6C1EInic84JK6uYrleL5XSh6dZcwgeClSOo RF8A== X-Gm-Message-State: AOAM5319eg+Z0jxG0qW5TiroSvbvf/SZuB4TsuUe9I9sziaUYNfJQ/XF kaU7NRYJSp7PyiDFG6PN4ZIiFqmTDtowOe9GiBQ= X-Google-Smtp-Source: ABdhPJyiMwpQqIKOMrDA9gKH/r5ZUTiKyOVCPYNRE+MqrRykb2V7eWNzxWzbPm3gaRyvy1woQZkpJnO0LP9BdGauS58= X-Received: by 2002:ac2:555e:: with SMTP id l30mr1703477lfk.303.1604765400887; Sat, 07 Nov 2020 08:10:00 -0800 (PST) In-Reply-To: <834km16u5w.fsf@gnu.org> 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:192845 Archived-At: --000000000000aaf4eb05b3868f54 Content-Type: text/plain; charset="UTF-8" On Sat, Nov 7, 2020 at 10:52 AM Eli Zaretskii wrote: > > From: Pierre Rouleau > > Date: Sat, 7 Nov 2020 10:39:41 -0500 > > Cc: dgutov@yandex.ru, 44494@debbugs.gnu.org > > > > One difference is that when using find-tag is using code from etags.el > exclusively: > > - find-tag-noselect > > . - find-tag-in-order , which tries different predicates and the one > that succeeds is > > tag-implicit-name-match-p > > . - it identifies the cc-bytecomp.el.gz > > .- calls etags-goto-tag-location > > The Xref etags backend also uses tag-implicit-name-match-p: > > (defvar etags-xref-find-definitions-tag-order '(tag-exact-match-p > > tag-implicit-name-match-p) > "Tag order used in `xref-backend-definitions' to look for definitions. > > If you want `xref-find-definitions' to find the tagged files by their > file name, add `tag-partial-file-name-match-p' to the list value.") > > > When using xref-find-definition the xref backend is used. It's not the > same code. > > The xref backend code for elisp does not find it. The backend code for > etags does not find it either. > > It tries to open cc-bytecomp.el as its the file name it gets from the > TAGS file. > > It detects the file not being present and reports it as missing, > assuming the file have been removed. > > > > To me the 2 sets of code look very different. > > They share some of the code, at least when xref-etags-mode is used. > So it sounds like some information found by tag-implicit-name-match-p > doesn't get handed back to Xref? > > For the Xref's own ELisp backend, we will probably need to code > something in xref.el. > Sorry, I meant that find-tag-in-order is able to find the reference in the TAGS file when it tries the tag-implicit-name-match-p predicate. find-tag-in-order returns a marker that identifies the .el.gz file. I agree that for the ELisp backend something probably needs to be done to support it. But I also think that something must also be done for the etags xref backend. -- /Pierre --000000000000aaf4eb05b3868f54 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Sat, Nov 7, 2020 at 10:52 AM Eli = Zaretskii <eliz@gnu.org> wrote:
> From: Pierre= Rouleau <pro= uleau001@gmail.com>
> Date: Sat, 7 Nov 2020 10:39:41 -0500
> Cc: dgutov@yande= x.ru, 44494@= debbugs.gnu.org
>
> One difference is that when using find-tag is using code from etags.el= exclusively:
> - find-tag-noselect
> . - find-tag-in-order=C2=A0 =C2=A0, which tries different predicates a= nd the one that succeeds is
> tag-implicit-name-match-p
> .=C2=A0 - it identifies the cc-bytecomp.el.gz
> .- calls etags-goto-tag-location

The Xref etags backend also uses tag-implicit-name-match-p:

=C2=A0 (defvar etags-xref-find-definitions-tag-order '(tag-exact-match-= p
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 tag-implicit-name-match-p)
=C2=A0 =C2=A0 "Tag order used in `xref-backend-definitions' to loo= k for definitions.

=C2=A0 If you want `xref-find-definitions' to find the tagged files by = their
=C2=A0 file name, add `tag-partial-file-name-match-p' to the list value= .")

> When using xref-find-definition the xref backend is used.=C2=A0 It'= ;s not the same code.=C2=A0
> The xref backend code for elisp does not find it.=C2=A0 The backend co= de for etags does not find it either.
> It tries to open cc-bytecomp.el as its the file name it gets from the = TAGS file.
> It detects the file not being present and reports it as missing, assum= ing the file have been removed.
>
> To me the 2 sets of code look very different.

They share some of the code, at least when xref-etags-mode is used.
So it sounds like some information found by tag-implicit-name-match-p
doesn't get handed back to Xref?

For the Xref's own ELisp backend, we will probably need to code
something in xref.el.

Sorry, I meant that find-ta= g-in-order is able to find the reference in the TAGS file when
it tries the tag-implicit-name-match-p predicate.=C2=A0 find-tag-in-orde= r returns a marker that identifies the .el.gz file.

I agree that for the ELisp backend something probably needs to be done to= support it.=C2=A0
But I also think that something must also= be done for the etags xref backend.
--
/Pierre
--000000000000aaf4eb05b3868f54--