From: "Philip K." <philipk@posteo.net>
To: emacs-devel@gnu.org
Subject: Xref Fallback
Date: Mon, 10 Aug 2020 19:10:13 +0200 [thread overview]
Message-ID: <874kpas9ze.fsf@posteo.net> (raw)
Hi,
a few weeks ago, I managed to port "dumb-jump"[0] to use Xref instead of
it's own custom interface[1]. Part of the transition was to deprecate
the old commands[2], that has lead to some complaints among
"lsp-mode"[3] users, because lsp-mode doesn't fall back on dumb-jump if
it has no results[4].
Part of the issue is that LSP's Xref activation function just returns
"'xref-lsp", the symbol that is specializes it's xref methods on,
without any checking -- which is fairly common from what I see. But if
that fails, Xref won't go on searching, even though the next backend
could have more to offer.
Before writing this message, I was fairly sure that there were some
discussions on this issue, but I couldn't find them in the archives
anymore, so just to be safe, I re-iterated the problem.
What I would want to know, is if there have been discussion on this
issue, what the status is, and if not what would have to be done. I can
imagine, that falling back onto the next backend isn't always desirable
(especially if etags is next, and it demands a TAGS file that doesn't
exist).
[0] For those unfamiliar, dumb-jump is a package for finding places
where functions or variables are defined, but without any permanent
external tools such as etags or indexing servers, but by using grep
or grep-like tools and a search-database
(https://github.com/jacktasia/dumb-jump).
[1] https://github.com/jacktasia/dumb-jump/pull/343
[2] https://github.com/jacktasia/dumb-jump/pull/349
[3] https://github.com/emacs-lsp/lsp-mode/
[4] https://github.com/jacktasia/dumb-jump/issues/353#issuecomment-671462247
[5] https://github.com/emacs-lsp/lsp-mode/blob/00fcee92ae2e57055fdb31d25741b9637fe96215/lsp-mode.el#L6174
next reply other threads:[~2020-08-10 17:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 17:10 Philip K. [this message]
2020-08-10 19:01 ` Xref Fallback Dmitry Gutov
2020-08-11 18:19 ` Philip K.
2020-08-11 18:51 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kpas9ze.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.