One ring to rule them all

I suppose I might have once read that GNU Emacs had a mark ring—that is, a capped collection of marked locations in the current buffer. But I’ve never really thought about it.

I can see a lot of possibilities in the idea, though—it’s implicitly a list of nominally important spots in the buffer, so of course it has the possibility of being useful.

There are two commands that have a lot of potential. Both are variations on C-SPC (set-mark-command).

The first is simply C-SPC C-SPC—that is, set-mark-command applied twice. The first time sets mark and activates it, the second deactivates it so any further motion won’t start establishing a region.

Having set the mark, you can next use C-u C-SPC, which is simply applying the universal argument to set-mark-command. This will start cycling back through the mark ring, with each invocation moving further back.

This may just be something I have to use repeatedly even when I don’t need to, to start finding situations where it will truly be helpful.

In which I humble myself terribly…

This is how poor a user of Emacs I am: I still habitually use C-@ (set-mark-command) to set the mark. I mean, on what planet is that easier or more ergonomic than C-SPC (set-mark-command)?

I actually started retraining myself to use C-SPC a while ago, and it’s mostly taken—but I still occasionally catch myself going for that awkward pinky-thumb-middle-finger chord that fires C-@.

More interesting for me to learn how to use effectively is C-x C-x (exchange-point-and-mark). I know I spend a lot of unnecessary time scrolling around the screen rather than targetting where I want to go. Internalizing C-x C-x is, I think, the first step in moving a little faster.

But there are other tools, as well.