emacs-devel
[Top][All Lists]
Advanced

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

Re: Xref completion


From: Dmitry Gutov
Subject: Re: Xref completion
Date: Thu, 3 Dec 2020 02:25:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 02.12.2020 23:44, Juri Linkov wrote:
One more point, I'm not sure if the order of the candidates are
important or not, but we can keep it the same order as in xref buffer.

Yes, better to keep the same order.

One additional question: is it possible to use only relative file names,
relative to the project root dir?  Absolute file names are too long.

Not always possible to do it against the project root (xref-find-definitions does not depend on project.el), but you can still find the longest parent directory and cut it off, similarly to how it's done in project--read-file-cpd-relative.

BTW, like you created xref--show-defs-minibuffer
as a possible option for xref-show-definitions-function,
wouldn't it be also nice to do the same and create
xref--show-xref-minibuffer as a possible option for
xref-show-xrefs-function?

Don't you usually want to iterate across multiple results, when the command is project-find-regexp or xref-find-references? Then the same logic will not work.

I mean, sometimes you probably want to find just one match, but changing xref-show-xrefs-function will affect all invocations.

Or maybe I should ask: how will xref--show-xref-minibuffer be different from xref--show-defs-minibuffer?



reply via email to

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