Next: Mouse Selection Prev: Help Up: Top
Many Emacs commands operate on an arbitrary contiguous part of the
current buffer. You can select text in two ways:
* You use special keys to select text by defining a region between
point and the mark.
* If you are running Lucid Emacs under X, you can also select text
with the mouse.
The Mark and the Region
To specify the text for a command to operate on, 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 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 a buffer. Each Emacs
buffer has its own mark; 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 the mark at one end of the inserted text--the
opposite end from where point is positioned, so that the region
contains the text just inserted.
Aside from delimiting the region, the mark is useful for marking a
spot that you may want to go back to. To make this feature more useful,
Emacs remembers 16 previous locations of the mark in the `mark ring'.
- Setting Mark
- Commands to set the mark.
- 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