Next: , Previous: , Up: Top   [Contents][Index]


9.2 Selecting Text with the Mouse

If you are using SXEmacs under X, you can use the mouse pointer to select text. (The normal mouse pointer is an I-beam, the same pointer that xterm uses.)

The glyph variable text-pointer-glyph controls the shape of the mouse pointer when over text. You can also control the shape of the mouse pointer when over nontext using nontext-pointer-glyph, and the shape of the mouse pointer when over the modeline using modeline-pointer-glyph. (Remember, you should use set-glyph-image, not setq, to set one of these variables.)

If you want to get fancy, you can set the foreground and background colors of the mouse pointer by setting the pointer face.

There are two ways to select a region of text with the mouse:

To select a word in text, double-click with the left mouse button while the mouse cursor is over the word. The word is highlighted when selected. On monochrome monitors, a stippled background indicates that a region of text has been highlighted. On color monitors, a color background indicates highlighted text. You can triple-click to select whole lines.

To select an arbitrary region of text:

  1. Move the mouse cursor over the character at the beginning of the region of text you want to select.
  2. Press and hold the left mouse button.
  3. While holding the left mouse button down, drag the cursor to the character at the end of the region of text you want to select.
  4. Release the left mouse button.

The selected region of text is highlighted.

Once a region of text is selected, it becomes the primary X selection (see Using X Selections) as well as the Emacs selected region. You can paste it into other X applications and use the options from the Edit pull-down menu on it. Since it is also the Emacs region, you can use Emacs region commands on it.


Next: , Previous: , Up: Top   [Contents][Index]