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: João Távora
Subject: Re: Adding support for xref jumping to headers/interfaces
Date: Sat, 4 Nov 2023 22:36:47 +0000

On Sat, Nov 4, 2023 at 10:29 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> On 05/11/2023 00:24, João Távora wrote:
> > On Sat, Nov 4, 2023 at 10:00 PM Dmitry Gutov<dgutov@yandex.ru>  wrote:
> >> On 20/06/2023 18:31, João Távora wrote:
> >>> If I remember correctly, SLIME (and SLY) have at least two types of
> >>> "reference" searches: "who calls" and "who expands".  They create the
> >>> typical ((file -> list of matches)...) listing in an SLIME xref buffer.
> >> Interesting. And AFAICS SLIME also has another kind of non-definitions
> >> search: slime-who-specializes.
> >>
> >> 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.

> > 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.

João



reply via email to

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