(emacs)Transient Mark

Next: Using Region Prev: Setting Mark Up: Mark

Transient Mark Mode

   Many Emacs commands move the mark and invisibly set new regions.
This means that there is almost always some region that you can act on.
This is convenient, provided you get used to keeping track of the
mark's position.

   Some people prefer a more rigid mode of operation in which you must
set up a region for each command that uses one--in which the region
"lasts" only temporarily.  This is called Transient Mark mode.  It is
particularly well-suited to window systems such as X, since Emacs can
highlight the region when it is active.

   To enable Transient Mark mode, type `M-x transient-mark-mode'.  This
command toggles the mode, so you can issue it again to return to the
normal Emacs way of handling the mark and the region.

   Here are the details of Transient Mark mode:

   * To set the mark, type `C-SPC' (`set-mark-command').  This makes
     the mark active; as you move point, you will see the region
     highlighting change in extent.

   * On a window system, an easy way to select a region is to press the
     button Mouse-1 (normally the left button) at one end of it, drag
     the mouse to the other end, and then release the button.

   * When the mark is active, you can execute any commands you want on
     the region, such as killing, indentation, or writing to a file.

   * Any change to the buffer, such as inserting or deleting a
     character, deactivates the mark.  This means any subsequent
     command that operates on a region will get an error and refuse to
     operate.  You can make the region active again by typing `C-x C-x'.

   * Commands like `M->' that "leave the mark behind" do not activate
     the new mark.  You can activate the new region by executing `C-x
     C-x' (`exchange-point-and-mark').

   * Quitting with `C-g' deactivates the mark.

   Transient Mark mode is also sometimes known as "Zmacs mode" because
the Zmacs editor on the MIT Lisp Machine handled the mark in a similar

   When multiple windows show the same buffer, they can have different
regions, because they can have different values of point.  In Transient
Mark mode, each window highlights its own region.  The part that is
highlighted in the selected window is the region that editing commands
use.  Note: Windows.

automatically generated by info2www