bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31754: 25.1; etags output lacks info for making xref more useful


From: Eli Zaretskii
Subject: 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@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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]