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

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

bug#22947: 25.0.92; xref-find-definitions fails for Perl & etags


From: Eli Zaretskii
Subject: bug#22947: 25.0.92; xref-find-definitions fails for Perl & etags
Date: Fri, 11 Mar 2016 10:04:25 +0200

> Cc: 22947@debbugs.gnu.org, rogers@modulargenetics.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 11 Mar 2016 03:45:39 +0200
> 
> On 03/10/2016 06:22 PM, Eli Zaretskii wrote:
> 
> > Then users will not use that switch.  And note that before these
> > changes, etags would _always_ produce only qualified names.  So the -Q
> > switch provides a way to get the old behavior back.
> 
> Honestly, I didn't use the "before" etags much. I did use 'ctags -e', 
> however. I imagine many users will be in a similar position.
> 
> ctags has had the --extra=+q option for years (although it's worked only 
> for a few languages). So if we're asking for arguments, they should be 
> for why deviate, rather than why do the same, the latter being the 
> default choice. And yes, users do want those:
> 
> https://github.com/universal-ctags/ctags/issues/787
> https://github.com/universal-ctags/ctags/issues/524
> 
> >> Do you expect the user to call 'etags' twice, with and without 'Q', and
> >> append the outputs?
> >
> > No, I think qualified names are almost never useful, given the way
> > TAGS tables are used in Emacs nowadays, so the -Q option is just a
> > kind of "fire escape" for use cases that I think should never happen.
> >
> > If I'm wrong, then I'd like to see these use cases described, and we
> > should then rethink the whole issue of qualified tag names.
> 
> Here's a couple of scenarios:
> 
> 1. Suppose there are a lot of classes that define the method bar. But I 
> know which class I'm interested in. So I type C-u M-., type 
> My::Class#bar, and jump to it straight away (typing it with completion 
> might be rather quick). If the tags file contains only unqualified 
> entries, I'm forced to see the whole list of methods with this name in 
> all classes, use isearch to go to the desired entry, press RET to jump 
> to it, and then do something about the xref window (I didn't need to see 
> the whole list in the first place, and it's taking up valuable screen 
> estate). More keypresses and micromanagement this way.
> 
> 2. Suppose I want to see all methods defined by the class Foo. I can 
> call xref-find-apropos, type in the class name, and if these is a fully 
> qualified entry for each of its methods in the tags table, I'll see them 
> all in the list. Or I want to see all methods in a family of classes 
> (unified by a namespace, or a common word in the name). Having all 
> qualified names listed would facilitate this kind of exploration.
> 
> Users shouldn't have to give up having functional xref-find-definitions 
> for these features.

Etags never had these features, so you are asking for enhancements.  I
suggest to file a separate wishlist bug report with these requests,
and maybe Someone will implement them at some point.

Note that adding such a feature would mean extending the generation of
class-qualified names to all the languages which have a notion of a
class or a package, so it's not a small job, and requires to have a
good understanding of many languages.

Personally, I'd like first to see if the current implementation of
etags + xref gives good results, before considering enhancements.
Without seeing user responses, we will never know how important these
features are.






reply via email to

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