From: Pierre Rouleau <prouleau001@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44494@debbugs.gnu.org, dgutov@yandex.ru
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 [thread overview]
Message-ID: <CALTqLiZ9EAYJGudZzQ3p-4zB9kdPEU+cYrY0J6SM1Bd2YRmFxw@mail.gmail.com> (raw)
In-Reply-To: <834km16u5w.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
On Sat, Nov 7, 2020 at 10:52 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pierre Rouleau <prouleau001@gmail.com>
> > 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
[-- Attachment #2: Type: text/html, Size: 2927 bytes --]
next prev parent reply other threads:[~2020-11-07 16:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 23:22 bug#44494: etags.el xref-location-marker does not handle TAGS references to .el.gz files Pierre Rouleau
2020-11-07 2:22 ` Dmitry Gutov
2020-11-07 3:31 ` Pierre Rouleau
2020-11-07 8:00 ` Eli Zaretskii
2020-11-07 14:15 ` Pierre Rouleau
2020-11-07 14:22 ` Eli Zaretskii
2020-11-07 14:37 ` Eli Zaretskii
2020-11-07 14:48 ` Pierre Rouleau
2020-11-07 15:39 ` Pierre Rouleau
2020-11-07 15:52 ` Eli Zaretskii
2020-11-07 16:09 ` Pierre Rouleau [this message]
2020-11-07 7:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALTqLiZ9EAYJGudZzQ3p-4zB9kdPEU+cYrY0J6SM1Bd2YRmFxw@mail.gmail.com \
--to=prouleau001@gmail.com \
--cc=44494@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).