6

The way to find definitions was changed in Emacs 25.

A new package called xref has replaced the old etags commands. This package doesn't seem to work for me.

For example: The command M-x find-tag was replaced by M-x xref-find-definitions but when I use it it says:

No definitions found for: ...

The same TAGS file works with older Emacs. Anyone can help with this?

Drew
  • 29,895
  • 7
  • 74
  • 104
siwesam
  • 463
  • 5
  • 8
  • 2
    (1) Please specify just what you tried, step by step, saying what you expected to see and what you saw instead. (2) `find-tag` is still present in Emacs 25.2. Does `M-x find-tag` not still work for you? (It should.) You can bind it to a key, including the key it was bound to before. (3) If the new command does not work for you, please consider filing a bug report: `M-x report-emacs-bug`, providing a step-by-step recipe starting from `emacs -Q`. – Drew Aug 17 '17 at 15:32
  • @Drew Thanks for the reply. I know that 'M-x find-tag' is still there. The problem is not with the existence of the command but with its behavior. When I use it I get the above error message even if the function was defined in the same file that I am in (same command with the same TAGS file on older emacs leads me to the function definition). – siwesam Aug 20 '17 at 09:09
  • Ah. In that case, please consider filing a bug report: `M-x report-emacs-bug`, providing a recipe to reproduce the problem, preferably starting from `emacs -Q` (no init file). Possibly they broke something when they added the `xref` stuff. (If you provide a recipe to repro the problem then perhaps others here can test whether the problem is a regression by using older releases of Emacs. Or you can, if you also have access to an older release.) – Drew Aug 20 '17 at 14:08
  • @Drew thanks! The problem was fixed by rebuilding the TAGS file with a newer version of etags. – siwesam Aug 22 '17 at 08:18
  • Thanks for following up by posting that answer. – Drew Aug 22 '17 at 13:51

1 Answers1

2

I used a newer etags version to rebuild the TAGS file and the problem was fixed.

I assume emacs 25.2 is not compatible with older etags versions.

siwesam
  • 463
  • 5
  • 8
  • I ran into this issue with `TAGS` for Haskell generated by `fast-tags`. Using `hasktags` instead to generate the `TAGS` solved the problem. – ntc2 Jun 26 '18 at 23:55