all messages for Emacs-related lists mirrored at yhetil.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: Tue, 20 Jul 2021 19:22:41 +0300	[thread overview]
Message-ID: <de4b28c1-195b-e817-f44f-b13317024dd3@yandex.ru> (raw)
In-Reply-To: <83lf615hfk.fsf@gnu.org>

On 20.07.2021 14:54, Eli Zaretskii wrote:
>> Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Tue, 20 Jul 2021 02:00:31 +0300
>>
>> On 19.07.2021 18:56, Eli Zaretskii wrote:
>>> As for the original request: I guess we could satisfy that by having
>>> Xref sort the matches so that those in the current buffer come first
>>> in the display we show in the*XREF*  buffer?  Dmitry, would it make
>>> sense to add such an option, and if so, would it be hard to do so?  In
>>> xref--alistify, perhaps, or in xref--analyze?
>>
>> It would probably better work as an etags option (residing next to
>> etags-xref-find-definitions-tag-order): Xref, in general, cannot know in
>> advance whether a given tags resides in the current buffer, and
>> following all tags is relatively costly.
> 
> But then this feature will be reserved only for the etags backend, no?
> 
> Maybe there should be a backend-specific sorting method or something?

Not 100% sure how that could work, but I'm reasonably certain that 
"prioritize hits in the current file" is mostly relevant to etags.

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.

Even if there are exceptions, I think only etags has the problem 
mentioned below. Other backends could simply always prioritize the 
current file, no user option needed.

>> I was thinking to suggest having that behavior on by default (and maybe
>> avoid adding a new variable altogether), but it seems to conflict with
>> the intention behind etags-xref-find-definitions-tag-order, so probably not.
> 
> Right.

^^^ the aforementioned problem.





  reply	other threads:[~2021-07-20 16:22 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 [this message]
2021-07-20 16:56           ` Eli Zaretskii
2021-07-20 22:36             ` Dmitry Gutov
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

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

  git send-email \
    --in-reply-to=de4b28c1-195b-e817-f44f-b13317024dd3@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 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.