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: Dmitry Gutov
Subject: bug#22947: 25.0.92; xref-find-definitions fails for Perl & etags
Date: Fri, 11 Mar 2016 03:45:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

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.





reply via email to

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