Previous: Primary Selection, Up: Cut and Paste [Contents][Index]

#### 12.3.3 Secondary Selection

In addition to the primary selection, the X Window System provides a second similar facility known as the secondary selection. Nowadays, few X applications make use of the secondary selection, but you can access it using the following Emacs commands:

`M-Drag-mouse-1`

  Set the secondary selection, with one end at the place where you press down the button, and the other end at the place where you release it (`mouse-set-secondary`). The selected text is highlighted, using the `secondary-selection` face, as you drag. The window scrolls automatically if you drag the mouse off the top or bottom of the window, just like `mouse-set-region` (see Mouse Commands).

  This command does not alter the kill ring.

`M-mouse-1`

  Set one endpoint for the secondary selection (`mouse-start-secondary`).

`M-mouse-3`

  Set the secondary selection, with one end at the position clicked and the other at the position specified with `M-mouse-1` (`mouse-secondary-save-then-kill`). This also puts the selected text in the kill ring. A second `M-mouse-3` at the same place kills the secondary selection just made.

`M-mouse-2`

  Insert the secondary selection where you click, placing point at the end of the yanked text (`mouse-yank-secondary`).

Double or triple clicking of `M-mouse-1` operates on words and lines, much like `mouse-1`.

If `mouse-yank-at-point` is non-`nil`, `M-mouse-2` yanks at point. Then it does not matter precisely where you click, or even which of the frame’s windows you click on. See Mouse Commands.

Previous: Primary Selection, Up: Cut and Paste [Contents][Index]