Next: , Previous: , Up: The Mark and The Region   [Contents][Index]


2.2.1 The Mark Stack

As was hinted at earlier, each buffer has a mark stack, providing a history of positions in that buffer. The current mark is the mark on the top of the stack; earlier values are recovered by popping the stack. Since commands that move a long distance save the old position on the mark stack, the mark stack commands are useful for jumping to interesting places in a buffer without having to do a search.

Command: Pop Mark (bound to C-M-Space)
Command: Pop and Goto Mark (bound to M-@, M-Space)

Pop Mark pops the mark stack, restoring the current mark to the next most recent value. Pop and Goto Mark also pops the mark stack, but instead of discarding the current mark, it moves the point to that position. Both commands deactivate the region.

Command: Exchange Point and Mark (bound to C-x C-x)

This command interchanges the position of the point and the mark, thus moving to where the mark was, and leaving the mark where the point was. This command can be used to switch between two positions in a buffer, since repeating it undoes its effect. The old mark isn’t pushed on the mark stack, since it is saved in the point.


Next: Using The Mouse, Previous: The Mark and The Region, Up: The Mark and The Region   [Contents][Index]