Questions tagged [xref]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

xref-find-definition goes to constructed init.el by doom emacs

I think this is doom emacs specific problem. Doom collects autoload functions into an ./local/etc/@/init.el file And when I do M-. (which is mapped to doom's +lookup/definition and in turn it tries ...
eugene's user avatar
  • 489
0 votes
1 answer
67 views

make projectile search functions work for non project files? (or include them as project files?)

Below is the situation I'm trying to solve project root is at ~/project/src/some.py `xref-find-definition` from `some.py` can go to python library in ~/.virtualenvs/myenv/lib/another.py Then, since ~...
eugene's user avatar
  • 489
0 votes
1 answer
33 views

xref-find-apropos vs vc-git-grep

I 've been using git specific commands from helm (I think it internally uses vc-git-grep I find xref-find-definitions work very well. and wonder how xref-find-apropos compare with vc-git-grep I coulnd'...
eugene's user avatar
  • 489
0 votes
1 answer
94 views

Xref-find-definitions 'no definitions found' for emacs source

I downloaded emacs source code from http://savannah.gnu.org/projects/emacs/, and the relevant tags from http://git.savannah.gnu.org/cgit/emacs.git/refs/tags . I ran ctags via ctags -e -R . over both ...
Eli Rusk's user avatar
0 votes
2 answers
52 views

Store output of xref-find-apropos in a variable within elisp code

Is it possible to extract the results returned by xref-find-apropos to a variable within elisp code? In particular, I want to get all files names where the found symbol occurs. So what I want is ...
Evgenii.Balai's user avatar
0 votes
1 answer
174 views

How do I update xref-backend-functions?

I'm not sure what kind of variable xref-backend-functions and how to update it. After I open a .c file, I do M-: and do (add-hook 'xref-backend-functions #'gxref-xref-backend) and it shows me (gxref-...
ackerleytng's user avatar
1 vote
1 answer
111 views

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 ...
anon2328's user avatar
1 vote
2 answers
150 views

How to automatically go to file when there is only one match in xref?

I don't see the point in displaying xref with one match. Hope there is a simple solution.
albert200000's user avatar
2 votes
1 answer
149 views

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: -----------...
dongli si's user avatar
1 vote
1 answer
314 views

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-...
wytten's user avatar
  • 111
1 vote
1 answer
405 views

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-...
Robert Synofzik's user avatar
6 votes
0 answers
409 views

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. ...
CrabMan's user avatar
  • 275
1 vote
0 answers
104 views

Can xref-find-definitions jump into packages in venv?

I have following Python file and my cursor is on top of os, or sys, or pprint. When I do xref-find-definitions it does not jump into their definition that is I belive location on the ~/venv file. Is ...
alper's user avatar
  • 1,300
7 votes
0 answers
477 views

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. ...
bashfuloctopus's user avatar
0 votes
1 answer
578 views

how to go to the first definition with xref-find-definitions, do not show all options?

When I press gd to go to the definition of a class in C++, Emacs splits the screen and shows me two definition options that I need to click on with one of them. I'm used to coc.nvim where I would just ...
Lucas Martins Soares's user avatar
1 vote
3 answers
167 views

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's user avatar
  • 8,546
0 votes
1 answer
122 views

How to prevent highlighting when using ‘xref-pop-marker-stack’

I was using dumb-jump to get back from jump definition's location. I started to get following message: ‘dumb-jump-back’ is an obsolete command (as of 2020-06-26); ‘dumb-jump-back’ has been obsoleted ...
alper's user avatar
  • 1,300
0 votes
2 answers
217 views

Xref / xref-find-refernces / Windows 7 does not work

I'm struggling with Xref M-? finding references to symbols (C-code). It doesn't work for (e)tags nor for any symbol even in the buffered file. The Xref window/buffer with results is not opened instead ...
chris-tian's user avatar
1 vote
1 answer
604 views

How to call xref-find-definitions without being prompted?

Is it possible to call xref-find-definitions to find the definition at the current point without being prompted to select the default? I'd like to bind this to a key, so it immediately jumps to a ...
ideasman42's user avatar
  • 8,546
1 vote
1 answer
89 views

Read Xref manual in Emacs

I want to read Xref (Find Identifiers References) in Emacs. When running info C-hi and then Info-menu m, I can not find any Xref topic. I have helm enabled, so it completes topics on info. For ...
nephewtom's user avatar
  • 2,229
2 votes
2 answers
4k views

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 ...
bgoodr's user avatar
  • 339
1 vote
1 answer
281 views

Automatic "push-mark" when navigating with xref, find-grep, etc?

There seem to be a lot of situations, where a command changes the cursor location (point), but no mark is pushed, making navigating back by popping the mark with C-u SPC impossible. For isolated use-...
kdb's user avatar
  • 1,561
1 vote
2 answers
120 views

Make 'ctags' detect fortran's "module procedure" pattern?

I am using ctags to index fortran files for code navigation in Emacs with M-.. In doing so I have noticed that it doesn't recognize declarations of the form MODULE PROCEDURE MySubroutineName ! or ...
kdb's user avatar
  • 1,561
2 votes
1 answer
192 views

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 ...
kdb's user avatar
  • 1,561
3 votes
1 answer
188 views

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 ...
Haydon Berrow's user avatar
3 votes
0 answers
70 views

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 ...
Lorem Ipsum's user avatar
  • 4,407
2 votes
2 answers
562 views

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/<package> and the source checked out from git in /src/<package>. When ...
Kevin Schwarz's user avatar
0 votes
0 answers
253 views

How do I select the xref completion buffer using the keyboard?

Prior to the appearance of xref hitting M-v would switch to the completions buffer. Now this does not appear to work however. I am running GNU Emacs 26.1 (build 1, x86_64-apple-darwin13.4.0, Carbon ...
tgerdin's user avatar
  • 11
1 vote
0 answers
43 views

xref suggestions are truncated

I use xref to find tags in emacs 25. My problem is with C defines, when there are multiple definitions. The *xref* buffer shows suggestions, but does not show enough text (it stops ...
Gauthier's user avatar
  • 499
2 votes
1 answer
170 views

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 ...
std_answ's user avatar
  • 191
2 votes
2 answers
187 views

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 ...
Calaf's user avatar
  • 483
3 votes
1 answer
592 views

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 ...
Calaf's user avatar
  • 483
0 votes
0 answers
119 views

recenter *xref* buffer on next-error

I have a next-error-hook to recenter the next-error-last-buffer, so if the buffer is displayed, it will recenter to the line of the error I just jumped to: (defun jpk/next-error-hook () (let ((win (...
jpkotta's user avatar
  • 508