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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Winston <wbe <at> psr.com>
Subject: bug#28403: closed (Re: bug#28403: 25.2; find-tag works, but
 xref-find-definitions)
Date: Mon, 11 Sep 2017 16:53:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 28403 <at> debbugs.gnu.org.

-- 
28403: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28403
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Winston <wbe <at> psr.com>
Cc: 28403-done <at> debbugs.gnu.org, dgutov <at> yandex.ru
Subject: Re: bug#28403: 25.2; find-tag works, but xref-find-definitions
Date: Mon, 11 Sep 2017 19:51:59 +0300
> Date: Mon, 11 Sep 2017 01:02 EDT
> From: Winston <wbe <at> psr.com>
> Cc: dgutov <at> yandex.ru, 28403 <at> debbugs.gnu.org
> 
> Eli asked:
> > I guess we can now close the bug report?
> 
> From my standpoint, yes.

Thanks, done.

> xref-find-definitions differs from find-tag several ways:
> * find-tag always prompted for a name, with the string at (point) as
>   the default name.  With no argument, xref-find-definitions does not
>   prompt, and tries immediately to go to a tag with that default name.
>   Use (setq xref-prompt-for-identifier t) to force prompting. 
> * find-tag allowed partial names.  xref-find-definitions does not.
>   Use TAB after a partial name in a prompt for completion(s).
> * If find-tag finds your tags OK but xref-find-definitions does not, you
>   may need to use --regexp with etags to help it identify the tag name.
>   (See etags man page.)  If even that doesn't help, try
> 							{whatever Dmitry
>   and Eli decide is a good long-term easy way to add '(tag-symbol-match-p)
>   to etags-xref-find-definitions-tag-order}.

Thanks.  Some of this is already in the documentation, other parts
will be if/when the code does what we are discussing now.

[Message part 3 (message/rfc822, inline)]
From: Winston <wbe <at> psr.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; find-tag works, but xref-find-definitions doesn't; bug?
Date: Sat,  9 Sep 2017 18:40 EDT
[Emacs 25.2; it looks (to me) like a regexp match pattern issue in
 xref.el, not an O/S issue.]

   Today I noticed the message about find-tag being (supposedly)
obsoleted by xref-find-definitions as of Emacs version 25.1, so I tried
the new command.  Unfortunately, the new one failed completely on an
entire class of function definitions.

   After some experimenting, it appears that the problem may be that
xref-find-definitions only works when the function definition is of the
form: name spacing* '('.

   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".

   Changing the function definition line to

        name (type variable)

as a test, re-running etags, and reloading TAGS, xref-find-definitions
found the tag and went to it.

   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.
 -WBE



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.