unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544@debbugs.gnu.org
Subject: bug#2544: 23.0.60; Could etags please try find a local tag first?
Date: Wed, 21 Jul 2021 01:36:08 +0300	[thread overview]
Message-ID: <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> (raw)
In-Reply-To: <838s206i0a.fsf@gnu.org>

On 20.07.2021 19:56, Eli Zaretskii wrote:

>> Because when one uses more precise backends, "find definition" gets
>> fewer hits, and you don't really need to choose which ones to start with
>> -- the current file or otherwise.
> 
> When a backend returns just one hit, this is a non-issue.  The OP
> specifically described a situation where there are many functions with
> the same name in the project.  That's the use case we are discussing.

Static analysis can very often determine which of the multiple functions 
with the same name will be used at a particular call site. Yes, there 
are exceptions (which will happen less frequently than with etags), like 
when we're trying to jump to a virtual function with overloads in 
several subclasses. But jumping to such function call from a file with 
one of the definitions, and not being able to determine which of the 
functions is going to be called, is going to be an even more rare 
occurrence.

And even so, those backends can choose to sort the results starting with 
the current file by default. No user option needed.

> I don't see how the backend can affect this situation.  Especially
> since the etags backend is also quite accurate.

I'm saying etags' particular characteristics and varied usage patterns 
justify the addition of an etags-specific variable.

I don't see much use for it for other backends, but if I'm proven wrong, 
that proof would also provide some new information which would help 
generalize the feature. This can happen at a later stage.





  reply	other threads:[~2021-07-20 22:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 21:36 bug#2544: 23.0.60; Could etags please try find a local tag first? Matzi Kratzi
2021-07-19 14:48 ` Lars Ingebrigtsen
2021-07-19 15:56   ` Eli Zaretskii
2021-07-19 23:00     ` Dmitry Gutov
2021-07-20 11:51       ` Lars Ingebrigtsen
2021-07-20 16:15         ` Dmitry Gutov
2021-07-20 11:54       ` Eli Zaretskii
2021-07-20 16:22         ` Dmitry Gutov
2021-07-20 16:56           ` Eli Zaretskii
2021-07-20 22:36             ` Dmitry Gutov [this message]
2021-07-21 10:39               ` Lars Ingebrigtsen
2021-07-26 23:15                 ` Dmitry Gutov
2021-07-28 15:49                   ` Lars Ingebrigtsen
2021-08-02  2:11                     ` Dmitry Gutov
2021-08-02 11:36                       ` Eli Zaretskii
2021-08-06  0:17                         ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=2544@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=matzikratzi@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).