When I use xref to jump to the definition of a symbol, I can retrace my steps using
I would like to be able to do the same thing after jumping to results in compilation, grep and occur buffers.
How can I do this?
An "obvious" way might have been to add something to
next-error-hook, but this does not work because
next-error-hook is run inside the compilation buffer instead of in the buffer containing the match.
This suggests that some kind of advice is needed. Is my assumption correct?