1

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 xref-find-definitions?

In my particular case I'd like to jump to a Java class definition of type XYZ, but am instead taken to a Java class that has an XYZ member declaration.

GNU Emacs 25.2.1

wytten
  • 111
  • 4

1 Answers1

0
  • M-x next-error, or
  • M-g n (same command), or
  • Switch to Xref's window and press n (maybe several times). When you see the buffer you're looking for displayed, press RET.
Dmitry
  • 3,508
  • 15
  • 20
  • For that command I get "next-error-find-buffer: No buffers contain error message locations" Also for some reason I don't get an *xref* buffer for XYZ but I do for other tags, which seems weird. – wytten Nov 05 '21 at 14:06
  • Try installing the latest version of `xref` from ELPA through `M-x list-packages`. That will bring `next-error` integration, among other things. But regarding `XYZ`, it seems there is only one definition that etags recognizes for it. You can `M-x report-emacs-bug` about that, but first try installing a newer version of Emacs, it might already be fixed. – Dmitry Nov 05 '21 at 22:17
  • The latest Emacs release at the moment is 27.2. – Dmitry Nov 05 '21 at 22:18