emacs-devel
[Top][All Lists]
Advanced

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

Re: Adding support for xref jumping to headers/interfaces


From: Dmitry Gutov
Subject: Re: Adding support for xref jumping to headers/interfaces
Date: Wed, 8 Nov 2023 01:02:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 07/11/2023 19:09, Spencer Baugh wrote:
Dmitry Gutov<dgutov@yandex.ru>  writes:
Still, though. It's not clear to me that improving this particular
feature for Elisp will bring a lot to the table.

Does it really do certain things better than simply using 'M-.' and
then choosing between all the available definition types inside the
buffer (and then navigating to one with TAB)?

Or if one prefers a more dynamic interface with completions, (setq
xref-xref-show-definitions-function
#'show-definitions-completing-read) could fit that bill.

There is a tradeoff of not being able to just press a single char, but
OTOH one doesn't always know which definition kind they want in
advance, and here, the full list helps one make that choice.
I guess one possible issue is that requesting all definitions and then
choosing between them could be expensive in certain languages.  Knowing
what kind of "definition" you want in advance could make things faster.
I don't have any concrete example of this, just putting out the thought.

Indeed it could, but is that a practical concern? For certain languages, or large projects, or etc?

In general, I'm not a fan of solving performance problems with requiring more manual control on the part of the user. We can do that, but hopefully only when there really are no better options.

And making the choice which kind to search for might save the machine 500ms during the search while requiring the user to spend several more seconds typing and thinking.

I was hoping people could try out my patch, and Joao's addition as well, and perhaps report with concrete examples.

And arguments can be unrelated to performance: e.g. certain "kinds" might really be unsuitable for the default set. Perhaps "find implementations" might fall in this variety.



reply via email to

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