The Emacs Mark

I just stumbled across an Emacs Elements video from 9 months ago. It’s about the Emacs mark and how to use it. There are lots of videos about this and Irreal has commented on some of them but it’s one of those subjects that I, at least, have a hard time internalizing so it bears repeating for some of us.

One nice feature of the video is the use of visible-mark to display the placement of the two most recent marks. That helps a bit with the exposition.

The video starts with ways to set the mark and exchange it with the point. Most Emacsers know the basics of that but may not know that you can set an inactivated mark with Ctrl+Space Ctrl+Space. That’s useful if you want to set the mark but not specify a region.

Similary, Ctrl+x Ctrl+x activates the mark when it’s swapped with the point so the region between them is highlighted. If you don’t want that, simple specify Ctrl+u Ctrl+x Ctrl+x instead.

Next, the video considers ways to mark various objects: word, sentence, paragraph, buffer, function, s-expression, or page. These are useful for deleting, copying, or moving text.

Finally, the video considers ways of using the mark for navigation. You can set the mark at a particular location and return to it later by popping the mark with Ctrl+u Ctrl+Space. This is made more useful by the fact that Emacs sets the mark automatically for many large movement commands.

The video is 13 minutes, 26 seconds so you’ll need to schedule some time but not too much. If you’re like me and have a hard time internalizing these commands, it’s worth your time to watch it.

This entry was posted in General and tagged . Bookmark the permalink.