Questions tagged [xref]

32 questions
7
votes
0 answers

xref unsuccessful in python buffers: "no definition found"

The command xref-find-definitions is no longer working for me in Python buffers (with elpy-mode enabled. Its companions, such as xref-find-references, are also not working in Python buffers. Specifically, when I press M-. I get No definition found…
bashfuloctopus
  • 203
  • 1
  • 6
4
votes
0 answers

I want xref-find-definitions that uses the second backend when the first backend doesn't find anything

I program in Haskell using lsp-mode with lsp-haskell. I need to have a working "jump to definition". xref-find-definitions using lsp--xref-backend sometimes fails to find the definition. xref-find-definitions using etags--xref-backend usually finds…
CrabMan
  • 255
  • 1
  • 5
3
votes
1 answer

calling xref-find-definitions within lisp code

I want to call xref-find-definitions from within my own lisp code and I'm struggling. (xref-find-definitions IDENTIFIER) Find the definition of the identifier at point. It wants a parameter but I don't understand what parameter to supply because…
3
votes
0 answers

xref gets confused by similar class names

If I use evil-jump-to-tag or xref-find-defintions on an inherited class module whose name is the same as a class in my current project, I am taken to the definition in the current project. I would expect to go to the definition given in the…
Lorem Ipsum
  • 4,327
  • 2
  • 14
  • 35
3
votes
1 answer

How can I highlight cursor or line in unselected frames?

Prelude Let me start by mentioning the scenario where the problem arises. I see that 2-3 variables are always used together in a system. I need to add yet another one that will be used along with them. I decide it would be wise to refactor, extract…
Calaf
  • 483
  • 3
  • 16
2
votes
1 answer

How to disable momentary highlighting of a match by xref and ggtags?

When I call gtags-find-tag-dwim, matches item will be highlighted for about one second. When I call xref-pop-marker-stack, matches item will be highlighted for about 0.2 second. like this: --------------------------- Add after Drew reply: There…
dongli si
  • 63
  • 8
2
votes
2 answers

How to use xref-find-references on Elisp files without "No references found for" errors

I am using GNU Emacs 26.3 on Ubuntu 19.10. I have a directory full of Emacs Lisp files with the .el file extension. All of them are loaded into the currently running Emacs. I can open up one of those files, put point on a function that is being…
bgoodr
  • 339
  • 2
  • 12
2
votes
1 answer

Improving Etags support for fortran?

When using xref with Fortran I noticed that indexing by etags is highly incomplete; Almost exclusively subroutines (and maybe functions) are index, but modules, types, constants and global variables are all ignored. This situation is even confirmed…
kdb
  • 1,561
  • 12
  • 21
2
votes
2 answers

How do I use xref-find-definitions with multiple source directories?

I'm attempting to make changes to an Emacs package. I currently have the version in use installed in ~/.emacs.d/elpa/ and the source checked out from git in /src/. When I navigate to, for example, fileA.el in /src/ and…
2
votes
1 answer

Using advice to run function before tag symbol lookup

I use xref-find-definition to look up the definition of a symbol name. When I call xref-find-definition, I want to Emacs to automatically find and load an appropriately named etags file. For this purpose, I have a function,…
std_answ
  • 191
  • 4
2
votes
2 answers

Longer flashing of search string during multi-file searches

When the cursor is in the *xref* buffer, following dired-do-find-regexp, the found string in the adjacent frame flashes, but too briefly, making it quite hard to see. A simple solution is to increase the duration of the pulse of the found…
Calaf
  • 483
  • 3
  • 16
1
vote
1 answer

xref-find-references and its seemingly random "Select project: " behavior

My daily workflow involves opening a number of diverse projects and navigating through them using Emacs. For some projects, xref-find-references requires me to select a project (with a "Select project:") prompt - as if it is unable to deduce the…
anon2328
  • 71
  • 5
1
vote
1 answer

xref-find-definitions, find next

In decades past when I used find-tag, I think there was a way to advance to the next tag definition if the first one found is not the one you were looking for. Is there a way to do this now that find-tag has been made obsolete by…
wytten
  • 111
  • 4
1
vote
1 answer

xref-find-defnition not finding any definition

I am a newbie and in this part of the tutorial: " More generally, if you want to see a function in its original source file, you can use the xref-find-definitions function to jump to it. xref-find-definitions works with a wide variety of languages,…
1
vote
3 answers

Given a list of (filepath line column), how to make this open as an xref buffer?

If I have a list of file locations in elisp, how would I create an xref window, showing these locations?
ideasman42
  • 8,375
  • 1
  • 28
  • 105
1
2 3