Hot answers tagged

2

Certaily with xref, Use revert: M-, is the default. xref-pop-marker-stack M-, (translated from <escape> ,) runs the command xref-pop-marker-stack (found in global-map), which is an interactive compiled Lisp function in xref.el. It is bound to M-,, <menu-bar> <edit> <goto> <xref-pop>. (xref-pop-marker-stack) ...


2

It's part of the Emacs manual: do C-h i m emacs RET i xref RET and you should get there. The i xref RET part looks for xref in the index of the Emacs manual.


1

You will need to convert that list to "xref item" values. See xref--collect-matches-1 for how this is done. Since your locations are not "xref matches", though, you will call xref-make instead of xref-make-match, and won't need the length argument. Note that you will also need the string contents on that line (it will be shown in the xref ...


1

You can customize xref-after-return-hook and remove xref-pulse-momentarily from it.


1

The question is unclear. What identifier do you want it to find the definition of? By default it uses the identifier at point - and it doesn't prompt you. If there's no identifier at point, it prompts you. (To be more precise, it depends on the current command. If (xref--prompt-p this-command) returns non-nil then it will also prompt you, even if there'...


1

Note: This is a very complicated solution. See How to use xref-find-references on Elisp files without "No references found for" errors for when I came to my senses and simplified things. Problems and fixes I found multiple things that I did that tripped me up: I had an ~/ID file that is generated using ID Utils. xref, or something beneath it, ...


1

xref provides UI for code navigation. The actual functionalities are provided by the backend. In you case, the backend is etags. If you open TAGS file, its format is very simple. It has only the information of tag definition. So you can not find reference of tag. So you got two solutions, Solution 1, Install lsp-mode and some language server, hope they ...


1

ctags supports regular expression which could be used to parse tags. Add below code into ~/.ctags, --regex-fortran=/^[ \t]*MODULE[ \t]+(PROCEDURE|SUBROUTINE)[ \t]+([a-zA-Z0-9_]+)/\2/s,subroutines/ hello.f is like, MODULE PROCEDURE MySubroutineName1 ! or MODULE SUBROUTINE MySubRoutineName2 Then run ctags -e hello.f to test. See https://duckduckgo.com/?...


1

The simple solution: Use ctags -e instead of etags (assuming "Exuberant Ctags"[1]) While man ctags explicitly says that etags is preferred for use with emacs, ctags seems to have much better fortran support. I now use: ctags -e --recurse # : : # : `- Recursive processing of subdirectories. # : Apparently also filters by ...


1

It seems you can call xref-find-definitions programatically by (xref-find-definitions (symbol-name (symbol-at-point))) or if you to be prompted for an identifier (funcall-interactively #'xref-find-definitions (xref--read-identifier "Find definitions of: "))


1

While working on its code, you can open /src/<packages>/fileA.el and call M-x eval-buffer. Do the same for the rest of the files in the said package that you might want to navigate to. That will make Emacs remember the new locations of the functions in this package. This is a solution for the built-in elisp xref backend. Not need for xref-etags-mode ...


1

You should use the new advice system `nadvice` instead of the old one. xref-find-definitions prompts the user already in its `interactive-form`. So you need to run `open-tags-file` in the interactive-form of your advice for the case that xref-find-definitions is called interactively. I use the interactive specification of xref-find-definitions of emacs 25.3....


1

(setq pulse-delay 0.09) works for me, and really increases the duration of the pulse. The problem is likely in how you change that value.


1

global-hl-line-mode, from standard library hl-line.el highlights the current line. If option global-hl-line-sticky-flag is non-nil then it does this in all windows. Library crosshairs.el (see Crosshair Highlighting) highlights also the current column, but it does so only in the selected window. You can have crosshairs shown in any buffers or modes, either ...


Only top voted, non community-wiki answers of a minimum length are eligible