A few weeks ago when I was talking about tricks to get back to your editing location in emacs, I neglected to mention the jump-to-register command, by default bound to
C-x r j. Actually, the first step is to save a location to a register:
C-x r SPC (point-to-register). You'll be prompted to enter a character to refer to the location.
The nice thing is, when you jump-to-register, you don't have to be in the same buffer or file as the saved location. So you can mark places that are interesting, go explore some other stuff, and then immediately leap back to the buffer and line that you need.
Do you use emacs registers much? There are a few things you can do with them, the most common being point-to-register/jump-to-register and copy-to-register/insert-register. Whereas the kill-ring is like a text clipboard vector, copy-to- and insert-register are like a clipboard associative array.
I find it useful to keep register identifiers (the single character that names a register) partitioned into namespaces:
- punctuation marks: canned useful strings defined with set-register that my .emacs loads at startup
- numbers: locations for jump-to-register
- letters: temporary copy-to-register strings for ad hoc cut/paste operations