When I use xref to jump to the definition of a symbol, I can retrace my steps using M-, (xref-pop-marker-stack).

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.