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: Tue, 12 Jun 2018 20:05:38 +0300

> From: Gauthier Östervall <gauthier@ostervall.se>
> Date: Tue, 12 Jun 2018 16:49:44 +0200
> Cc: 31754@debbugs.gnu.org
> 
> > 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.
> 
> I am not a fan of tooltips, to be honest.

It's standard UI for these cases.  But we could, of course, have an
option whereby the XREF buffer itself would display enough of the
function's beginning to show the same info.

> In order to show the full signature, XREF would need to parse the
> source files.

Well, "parse" is really an exaggeration here.  More like "display the
first sexp", I'd say.  Every programming language mode already knows
how to do such limited "parsing".

> etags is already parsing files anyway, I can't see why not let it
> save whole signatures to TAGS?

Because it will bloat TAGS by a large factor.  Think about large
projects with hundreds of source files.  Even in Emacs, which is not
such a large package by modern standards, the combined TAGS table
weighs in at about 4MB.  The larger TAGS, the slower searches and
completion based on it.

It isn't TAGS' role, anyway.  TAGS is there to provide "links" to the
places in sources where functions are defined, it only shows the text
at that place for 2 purposes: (1) so that links won't break when the
source file changes in small ways, and the function moves to a
different line/byte offset; and (2) to show the identifier (the
function's name) itself, so as to allow Emacs to find in TAGS the
identifier the user requests.  Anything else is something Xref should
do when it finds the place where TAGS points, IMO.  Besides, this
feature will I think be valuable with Xref back-ends other than etags.





reply via email to

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