[Top][All Lists]

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

Re: Poll: Change xref-show-definitions-function's default?

From: Dmitry Gutov
Subject: Re: Poll: Change xref-show-definitions-function's default?
Date: Mon, 4 Jan 2021 18:14:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 04.01.2021 16:21, Philip K. wrote:

The idea would be that the interaction would look something like this:

1. The user invokes xref-find-definitions.
2. Instead of presenting the solutions, it jumps to the first one, and
    if there are more, this is indicated in the minibuffer.
3. Other matches can be displayed using next-error/previous-error
4. At this point, the buffer could be opened, or one could stick to the
    minibuffer and generate a message like "showing definition N out of

It's a good plan, but the devil is in the details.

I haven't looked into next-error/previous-error, so it might be that
this isn't feasible, without rewriting a lot of code.

next-error/previous-error might be a bit unreliable when there are other next-error-capable buffers around. And especially when the user has customized next-error-find-buffer-function. Anyway, you can try and see.

Also re. 4, if the buffer is not needed, you could probably use the fileloop package. It might need to be updated to behave "lazily", however.

It goes without saying that this should not be the default option.

If you want to work on such patch for the optional behavior, I'd be happy to review it.

reply via email to

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