[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consistency for xref-show-{xrefs,definitions}-function
From: |
Gabriel do Nascimento Ribeiro |
Subject: |
Re: Consistency for xref-show-{xrefs,definitions}-function |
Date: |
Sat, 16 Jan 2021 15:35:51 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>
> Why do you want this?
>
> xref-find-definitions differs from the rest of Xref-using commands in
> that it usually only find one location, and when there are several,
> the user wants to quickly choose one of the alternatives, the faster
> the better. The different options for xref-show-definitions-function
> provide different solutions for that problem.
>
> In all other cases returning multiple results is the common case, and
> you usually want to see all of them, not just one. For that, the
> completing-read UI, for example, is not very suitable.
Thanks for the inputs.
My use case is: when inside a project, the only option to jump to a
certain location is by using 'C-x p g' (which runs 'xref--show-xrefs')
and selecting the desired location from the list of matches in a
separated buffer. I would like to be able to select a single element
from this list of matches, preferably with 'completing-read'.
I took another look in the code, so I guess we can keep the xrefs
functions as it is and tweak 'project-find-regexp' to be more flexible
on this.