GNU bug report logs - #31754
25.1; etags output lacks info for making xref more useful

Previous Next

Package: emacs;

Reported by: Gauthier Östervall <gauthier <at> ostervall.se>

Date: Fri, 8 Jun 2018 09:23:02 UTC

Severity: wishlist

Found in version 25.1

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gauthier Östervall <gauthier <at> ostervall.se>
Cc: 31754 <at> debbugs.gnu.org
Subject: Re: bug#31754: 25.1;
 etags output lacks info for making xref more useful
Date: Mon, 11 Jun 2018 20:46:09 +0300
severity 31754 wishlist
thanks

> From: Gauthier Östervall <gauthier <at> ostervall.se>
> Date: Fri, 8 Jun 2018 11:21:54 +0200
> 
> Given the following code:
> 
> ---8<---
> int my_identifier(int a) {
>     return 2 * a;
> }
> 
> int my_identifier(int a, int b) {
>     return a + b;
> }
> ---8<---
> 
> and a TAGS file generated with etags (no options).
> 
> Running xref-find-definitions (M-.) opens a suggestion buffer with this content:
> 
> ---8<---
> /home/gauthier/tmp/xref.c
> 1: int my_identifier(
> 5: int my_identifier(
> ---8<---
> 
> This could be more helpful, the suggestions are not distinguishable. I
> suggest including at least the whole source row.

I originally thought that etags should be extended to include the
while line in TAGS, at least as an option, but the more I think about
this, the less I'm convinced thats the right approach.  For starters,
no one said that line will show enough to tell the difference.  For
example, imagine this code:

  int my_identifier(int a,
		    int b) {
      return 2 * a + b;
  }

  int my_identifier(int a,
		    int b, double fac) {
      return fac*a + b;
  }

So now I think that perhaps we should leave etags alone, and instead
add a feature to xref whereby the lines in the XREF buffer will show
in a tooltip the full signature of the function.

Any takers?




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

Previous Next


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