C-x r SPC r
Record the position of point and the current buffer in register
C-x r j r
Jump to the position and buffer saved in register
C-x r SPC (
point-to-register), followed by a character
r, saves both the position of point and the current buffer in register
r. The register retains this information until you store something else in it.
C-x r j r switches to the buffer recorded in register
r, pushes a mark, and moves point to the recorded position. (The mark is not pushed if point was already at the recorded position, or in successive calls to the command.) The contents of the register are not changed, so you can jump to the saved position any number of times.
If you use
C-x r j to go to a saved position, but the buffer it was saved from has been killed,
C-x r j tries to create the buffer again by visiting the same file. Of course, this works only for buffers that were visiting files.