From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel@gnu.org
Subject: xref-collect-references picks wrong search backend
Date: Thu, 10 Sep 2015 10:40:21 -0500 [thread overview]
Message-ID: <86fv2m1dwa.fsf@stephe-leake.org> (raw)
My use case:
I'm browsing Emacs source code (elisp, C, texinfo, etc).
I have run Gnu Global on the Emacs root directory, mostly to find out if
that's useful (so far not, because etags is better, but in other projects
it could be useful).
I'm in an elisp file, and invoke M-? on an elisp function.
That calls xref-collect-references, which let-binds
(semantic-symref-tool 'detect) and calls
semantic-symref-find-references-by-name. That uses a search backend from
semantic-symref-tool-alist, and chooses global.
But global doesn't process elisp files (perhaps it should, but that's
another issue), so no references are found.
I'm actually using an experimental multi-language project setup that
provides an xref-find-function that calls xref-collect-references
directly for elisp searches, so I suggest the following solution:
- Add an optional symref-tool arg to xref-collect-references; my
xref-find-function can set that to 'grep for elisp searches.
elisp--xref-find-references could also set it to 'grep.
--
-- Stephe
next reply other threads:[~2015-09-10 15:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 15:40 Stephen Leake [this message]
2015-09-11 1:12 ` xref-collect-references picks wrong search backend Dmitry Gutov
2015-09-11 15:57 ` Stephen Leake
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=86fv2m1dwa.fsf@stephe-leake.org \
--to=stephen_leake@stephe-leake.org \
--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.