GNU bug report logs - #28403
25.2; find-tag works, but xref-find-definitions doesn't; bug?

Previous Next

Package: emacs;

Reported by: Winston <wbe <at> psr.com>

Date: Sat, 9 Sep 2017 22:41:02 UTC

Severity: normal

Found in version 25.2

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

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Winston <wbe <at> psr.com>, 28403 <at> debbugs.gnu.org
Subject: Re: bug#28403: 25.2; find-tag works, but xref-find-definitions
 doesn't; bug?
Date: Sun, 10 Sep 2017 02:10:02 +0300
On 9/10/17 1:39 AM, Winston wrote:

>     The C code in question uses macros around function arguments in its
> definitions.  E.g.,
> 
>          name _ARGS1(type,variable)
> 
>     find-tag (and etags) work just fine with that, and such function
> definition lines appear in the TAGS file (as they should), but
> xref-find-definitions fails to find such function tags, saying instead
> "No definitions found for: name".

Which program are you generating TAGS with? Is it etags that comes with 
Emacs? xref-find-definitions is somewhat stricter about its input than 
find-tag.

What does the entry for this function inside TAGS look like? You can 
paste it into the reply. The TAGS format is close to plain text.

I'm guessing it looks like:

name _ARGS1(

which is an "implicit tag name" entry for "_ARGS1", but not for "name". 
IOW, etags doesn't understand macros.

>     So, xref-find-definitions is not yet a complete replacement for
> find-tag.  Since etags puts such lines in TAGS and xref-find-definitions
> is unable to match up the name with the tag, it looks like a bug /
> deficiency in xref-find-definitions.

Try adding `tag-symbol-match-p' to 
etags-xref-find-definitions-tag-order. This example should work then, 
but you'll get more false positives (like treating return types as 
function names).




This bug report was last modified 7 years and 253 days ago.

Previous Next


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