Next: Killing Prev: Help Up: Top
The Mark and the Region
There are many Emacs commands which operate on an arbitrary
contiguous part of the current buffer. To specify the text for such a
command to operate on, you set "the mark" at one end of it, and move
point to the other end. The text between point and the mark is called
"the region". You can move point or the mark to adjust the boundaries
of the region. It doesn't matter which one is set first
chronologically, or which one comes earlier in the text.
Once the mark has been set, it remains where you put it until it is
set again at another place. The mark remains fixed with respect to the
preceding character if text is inserted or deleted in the buffer. Each
Emacs buffer has its own mark, so that when you return to a buffer that
had been selected previously, it has the same mark it had before.
Many commands that insert text, such as `C-y' (`yank') and `M-x
insert-buffer', position point and the mark at opposite ends of the
inserted text, so that the region contains the text just inserted.
Aside from delimiting the region, the mark is also useful for
remembering a spot that you may want to go back to. To make this
feature more useful, each buffer remembers 16 previous locations of the
mark in the "mark ring".
- Setting Mark
- Commands to set the mark.
- Transient Mark
- How to make Emacs highlight the region-
when there is one.
- Using Region
- Summary of ways to operate on contents of the region.
- Marking Objects
- Commands to put region around textual units.
- Mark Ring
- Previous mark positions saved so you can go back there.
automatically generated by info2www