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: Tue, 7 Mar 2023 23:03:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 07/03/2023 21:58, Felician Nemeth wrote:
Yuan Fu <casouri@gmail.com> writes:

There's also the issue of assigning keys to them (for tmm-menubar
alike interface), which might be harder to do automatically.

We could just do completing-read, but that's bound to be slower to work with.


I like the idea of xref-find-extra. For keys we can support both
auto-compute (use first character) and backend-chosen keys, similar to
read-multiple-choice. We can even allow users to customize it.

I think this approach might be problematic if the major-mode provides a
"declaration" type and, say, Eglot provides a "definition" type.  But
maybe, as you write, providing customization options to the users is a
simple solution in this rare case.

I'd rather the backend did the disambiguation rather than make it the responsibility of the user.

Or we can have a registry of extra types, but then we'll have to either think of making of extensible or discuss additions from time to time.

Completing-read is a bad idea, as you said, it’s going to be slow,
much slower and less pleasant to use.

Currently all I write are emails, but long ago I wrote a simple,
tmm-based completing-read function to overcome this problem.  Maybe that
approach is useful here as well:
https://github.com/nemethf/single-key-completion/

This could work as the automated disambiguation approach, I guess?

Anyway, I think we'll make the reading UI customizable.




reply via email to

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