emacs-devel
[Top][All Lists]
Advanced

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

xref-collect-references picks wrong search backend


From: Stephen Leake
Subject: xref-collect-references picks wrong search backend
Date: Thu, 10 Sep 2015 10:40:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

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



reply via email to

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