|
From: | Dmitry Gutov |
Subject: | Re: Adding support for xref jumping to headers/interfaces |
Date: | Sun, 5 Nov 2023 01:20:42 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 05/11/2023 00:36, João Távora wrote:
Speaking of the two former ones, though: is there a point in using two different commands, if their outputs never "intersect"? That is, one is for the macros, and another for regular functions. Why wouldn't 'slime-who-calls' also work on macros, printing their expansion sites?I think maybe just to limit the signal to noise ratio. Maybe I'm specifically interested in macro expansions only. But I kind of agree that, at least in Lisp, calling and expanding isn't usually very different in terms of what I want to know about such a site.But if who-calls only works for functions and who-expands only works for macros, only one of them would work for a given symbol, right? The other would return an empty list.Yeah, you're right, I guess. IDK, SLIME has always worked like that.
I suppose one benefit would be in narrowed down completion, if the user inputs the symbol to search by hand. But that seems very minor.
Anyway, does this mean that xref.el is soon to have a solution for this? The one I vaguely remember discussing in this thread. Something like a single xref-find-other command + a selector for the type of reference, right?Maybe it will, maybe actually not. See one of my next few emails with a patch to try out (with the things you mentioned) and some further questions to ponder.Will the patch have changes to Eglot as well? Hoping it does, but if it doesn't leave some instructions on how to do that. That's mostly what I'm interested in, i.e. how easy it is to plug into. The interface is easier to tweak once we have concrete use cases to work with.
Please see xref-find-extras.diff in the other email. Eglot -- or any other backend -- would need to provide overrides for xref-backend-extra-kinds and xref-backend-extra-defs.
[Prev in Thread] | Current Thread | [Next in Thread] |