all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Gauthier Östervall" <gauthier@ostervall.se>
Cc: 31754@debbugs.gnu.org
Subject: bug#31754: 25.1; etags output lacks info for making xref more useful
Date: Mon, 11 Jun 2018 20:46:09 +0300	[thread overview]
Message-ID: <83y3flp672.fsf@gnu.org> (raw)
In-Reply-To: <CAM8gEghdn-rdauiBY+0vD2L5z4+4oUftD4i6fhz9p8zwsPMRRA@mail.gmail.com> (message from Gauthier Östervall on Fri, 8 Jun 2018 11:21:54 +0200)

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	other threads:[~2018-06-11 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08  9:21 bug#31754: 25.1; etags output lacks info for making xref more useful Gauthier Östervall
2018-06-11 17:46 ` Eli Zaretskii [this message]
2018-06-12 14:49   ` Gauthier Östervall
2018-06-12 17:05     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y3flp672.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=31754@debbugs.gnu.org \
    --cc=gauthier@ostervall.se \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.