devinprater,

Now this is pretty cool!

Whenever you set the Region, whether with C-SPC (‍set-mark-command‍) or a mouse selection, or implicitly with textual
object mark commands (like M-h (‍mark-paragraph‍)), the Mark’s current location is pushed onto the Mark Ring. The Mark is
also set for you automatically at places where you’ve done “significant” things, like changing text, moving a long way
away in one big jump (there being many ways to do this), the spot where you issued a search command, and the like, and
these locations also go onto the Mark Ring.

Thus a breadcrumb trail of Marks is left for you to find your way back, Theseus-like, to where you’ve been, and provides
a quick way to get back to these previous locations. The way to jump back to the previous Mark location is to give C-SPC
(‍set-mark-command‍) an argument, so C-u C-SPC. It also rotates the Mark Ring, so that a repeated, uninterrupted sequence
of C-u C-SPC commands will take you back in time through your previous Mark locations. The Mark Ring is a circular
structure, so when you hit the end, you’ll circle round to the most recent Mark location again. You’ll notice the
analogies to the operation of the Kill Ring.

https://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html

-emacs

leadore,

@devinprater
Also, if you are at a spot you think you'll want to come back to later, but you don't want to mark a region, you can just hit C-SPC twice. That sets the mark and immediately deactivates it, but still adds the spot to the mark ring.

@bgtlover

pgaylor2013,

@devinprater wow, now that is very interesting indeed.

arialdo,
@arialdo@mastodon.online avatar

@devinprater wait to discover consult-mark exists…

mrFred489,
@mrFred489@fosstodon.org avatar

@devinprater Thank you! I didn’t know about C-u C-spc. I have occasionally been frustrated that I had overridden a previous mark, but not frustrated enough to research how to use them properly.

bgtlover,

@devinprater that, for example, is another thing I didn't know. See?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • emacs
  • Durango
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • khanakhh
  • InstantRegret
  • Youngstown
  • ngwrru68w68
  • slotface
  • rosin
  • tacticalgear
  • mdbf
  • kavyap
  • modclub
  • megavids
  • osvaldo12
  • ethstaker
  • cubers
  • normalnudes
  • everett
  • tester
  • GTA5RPClips
  • Leos
  • cisconetworking
  • provamag3
  • anitta
  • JUstTest
  • lostlight
  • All magazines