diff options
| author | Chong Yidong | 2008-10-19 05:00:18 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-10-19 05:00:18 +0000 |
| commit | e9f5524eda42f353cd97f5cfbe534330b5ba8015 (patch) | |
| tree | 4d7f51c84b2fae69229644c3fadc29a14e7e7fc5 | |
| parent | 25597d40a213d6c89136bf92e057ee80cd13661b (diff) | |
| download | emacs-e9f5524eda42f353cd97f5cfbe534330b5ba8015.tar.gz emacs-e9f5524eda42f353cd97f5cfbe534330b5ba8015.zip | |
(Cut/Paste Other App): Document yank-pop-change-selection.
(Secondary Selection): Fix modified mouse click syntax.
(Clipboard): Describe Cut, Copy and Paste commands.
(Mouse References): Not all references are in read-only buffers.
| -rw-r--r-- | doc/emacs/frames.texi | 130 |
1 files changed, 71 insertions, 59 deletions
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index c9a8bb84a3f..54e64b052e9 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -232,13 +232,12 @@ Select the text you drag across, in the form of whole lines. | |||
| 232 | @cindex X selection | 232 | @cindex X selection |
| 233 | @cindex primary selection | 233 | @cindex primary selection |
| 234 | @cindex selection, primary | 234 | @cindex selection, primary |
| 235 | When running Emacs under the X window system, you can transfer text | 235 | When running Emacs under the X window system, you can easily |
| 236 | between Emacs and other X applications using the @dfn{primary | 236 | transfer text between Emacs and other X applications using the |
| 237 | selection}. The primary selection is sometimes also referred to as | 237 | @dfn{primary selection} (also called the @dfn{X selection}). This is |
| 238 | the @dfn{X selection}. It @emph{not} the same thing as the | 238 | @emph{not} the same thing as the @dfn{clipboard}, which is a separate |
| 239 | @dfn{clipboard}, a separate facility used on desktop environments such | 239 | facility used on desktop environments such as Gnome, and on operating |
| 240 | as Gnome, and on operating systems such as Microsoft Windows | 240 | systems such as Microsoft Windows (@pxref{Clipboard}). |
| 241 | (@pxref{Clipboard}). | ||
| 242 | 241 | ||
| 243 | Under X, whenever you select some text in Emacs by dragging or | 242 | Under X, whenever you select some text in Emacs by dragging or |
| 244 | clicking the mouse (@pxref{Mouse Commands}), it is also saved in the | 243 | clicking the mouse (@pxref{Mouse Commands}), it is also saved in the |
| @@ -254,12 +253,17 @@ contents of the primary selection are lost. | |||
| 254 | such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in | 253 | such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in |
| 255 | the primary selection. @xref{Killing}. | 254 | the primary selection. @xref{Killing}. |
| 256 | 255 | ||
| 256 | @vindex select-active-regions | ||
| 257 | @vindex yank-pop-change-selection | ||
| 257 | If you set the region using the keyboard, the text within the region | 258 | If you set the region using the keyboard, the text within the region |
| 258 | is not saved to the primary selection. However, if you change the | 259 | is not normally saved to the primary selection. However, if you |
| 259 | variable @code{select-active-regions} to @code{t}, the region is | 260 | change the variable @code{select-active-regions} to @code{t}, the |
| 260 | automatically saved to the primary selection each time you activate | 261 | region is saved to the primary selection each time you activate the |
| 261 | the mark (however, the primary selection is @emph{not} updated if you | 262 | mark (the primary selection is @emph{not} updated if you subsequently |
| 262 | subsequently change the region by moving point). | 263 | change the region by moving point). If you change the variable |
| 264 | @code{yank-pop-change-selection} to @code{t}, rotating the kill ring | ||
| 265 | with @kbd{M-y} (@code{yank-pop}) also saves the new yank to the | ||
| 266 | primary selection (@pxref{Yanking}). | ||
| 263 | 267 | ||
| 264 | @cindex cut buffer | 268 | @cindex cut buffer |
| 265 | @vindex x-cut-buffer-max | 269 | @vindex x-cut-buffer-max |
| @@ -290,89 +294,97 @@ different data type by modifying the variable | |||
| 290 | @subsection Secondary Selection | 294 | @subsection Secondary Selection |
| 291 | @cindex secondary selection | 295 | @cindex secondary selection |
| 292 | 296 | ||
| 293 | The @dfn{secondary selection} is another way of selecting text using | 297 | In addition to the primary selection, the X Window System provides a |
| 294 | the X Window System. It does not use point or the mark, so you can | 298 | second similar facility known as the @dfn{secondary selection}. |
| 295 | use it to kill text without setting point or the mark. | 299 | Nowadays, few X applications make use of the secondary selection, but |
| 300 | you can access it using the following Emacs commands: | ||
| 296 | 301 | ||
| 297 | @table @kbd | 302 | @table @kbd |
| 298 | @findex mouse-set-secondary | 303 | @findex mouse-set-secondary |
| 299 | @kindex M-Drag-Mouse-1 | 304 | @kindex M-Drag-Mouse-1 |
| 300 | @item M-Drag-Mouse-1 | 305 | @item M-@key{Drag-Mouse-1} |
| 301 | Set the secondary selection, with one end at the place where you press | 306 | Set the secondary selection, with one end at the place where you press |
| 302 | down the button, and the other end at the place where you release it | 307 | down the button, and the other end at the place where you release it |
| 303 | (@code{mouse-set-secondary}). The highlighting appears and changes as | 308 | (@code{mouse-set-secondary}). The selected text is highlighted, using |
| 304 | you drag. You can control the appearance of the highlighting by | 309 | the @code{secondary-selection} face, as you drag. The window scrolls |
| 305 | customizing the @code{secondary-selection} face (@pxref{Face | 310 | automatically if you drag the mouse off the top or bottom of the |
| 306 | Customization}). | 311 | window, just like @code{mouse-set-region} (@pxref{Mouse Commands}). |
| 307 | 312 | ||
| 308 | If you move the mouse off the top or bottom of the window while | 313 | This command does not alter the kill ring. |
| 309 | dragging, the window scrolls at a steady rate until you move the mouse | ||
| 310 | back into the window. This way, you can mark regions that don't fit | ||
| 311 | entirely on the screen. | ||
| 312 | |||
| 313 | This way of setting the secondary selection does not alter the kill ring. | ||
| 314 | 314 | ||
| 315 | @findex mouse-start-secondary | 315 | @findex mouse-start-secondary |
| 316 | @kindex M-Mouse-1 | 316 | @kindex M-Mouse-1 |
| 317 | @item M-Mouse-1 | 317 | @item M-@key{Mouse-1} |
| 318 | Set one endpoint for the @dfn{secondary selection} | 318 | Set one endpoint for the @dfn{secondary selection} |
| 319 | (@code{mouse-start-secondary}). | 319 | (@code{mouse-start-secondary}). |
| 320 | 320 | ||
| 321 | @findex mouse-secondary-save-then-kill | 321 | @findex mouse-secondary-save-then-kill |
| 322 | @kindex M-Mouse-3 | 322 | @kindex M-Mouse-3 |
| 323 | @item M-Mouse-3 | 323 | @item M-@key{Mouse-3} |
| 324 | Make a secondary selection, using the place specified with @kbd{M-Mouse-1} | 324 | Set the secondary selection, with one end at the position clicked and |
| 325 | as the other end (@code{mouse-secondary-save-then-kill}). This also | 325 | the other at the position specified with @kbd{M-Mouse-1} |
| 326 | puts the selected text in the kill ring. A second click at the same | 326 | (@code{mouse-secondary-save-then-kill}). This also puts the selected |
| 327 | text in the kill ring. A second @kbd{M-@key{Mouse-3}} at the same | ||
| 327 | place kills the secondary selection just made. | 328 | place kills the secondary selection just made. |
| 328 | 329 | ||
| 329 | @findex mouse-yank-secondary | 330 | @findex mouse-yank-secondary |
| 330 | @kindex M-Mouse-2 | 331 | @kindex M-Mouse-2 |
| 331 | @item M-Mouse-2 | 332 | @item M-@key{Mouse-2} |
| 332 | Insert the secondary selection where you click | 333 | Insert the secondary selection where you click, placing point at the |
| 333 | (@code{mouse-yank-secondary}). This places point at the end of the | 334 | end of the yanked text (@code{mouse-yank-secondary}). |
| 334 | yanked text. | ||
| 335 | @end table | 335 | @end table |
| 336 | 336 | ||
| 337 | Double or triple clicking of @kbd{M-Mouse-1} operates on words and | 337 | Double or triple clicking of @kbd{M-@key{Mouse-1}} operates on words |
| 338 | lines, much like @kbd{Mouse-1}. | 338 | and lines, much like @key{Mouse-1}. |
| 339 | 339 | ||
| 340 | If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2} yanks | 340 | If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-@key{Mouse-2}} |
| 341 | at point. Then it does not matter precisely where you click, or even | 341 | yanks at point. Then it does not matter precisely where you click, or |
| 342 | which of the frame's windows you click on. @xref{Mouse Commands}. | 342 | even which of the frame's windows you click on. @xref{Mouse |
| 343 | Commands}. | ||
| 343 | 344 | ||
| 344 | @node Clipboard | 345 | @node Clipboard |
| 345 | @subsection Using the Clipboard | 346 | @subsection Using the Clipboard |
| 346 | @cindex clipboard | 347 | @cindex clipboard |
| 347 | @vindex x-select-enable-clipboard | ||
| 348 | @findex menu-bar-enable-clipboard | ||
| 349 | @cindex OpenWindows | ||
| 350 | @cindex Gnome | ||
| 351 | 348 | ||
| 352 | Apart from the primary and secondary selection types, Emacs can | 349 | In desktop environments such as Gnome, and operating systems such as |
| 353 | handle the @dfn{clipboard} selection type which is used by some | 350 | Microsoft Windows and Mac OS X, you can transfer data (usually text) |
| 354 | desktop environments, such as Gnome. | 351 | between different applications using the @dfn{clipboard}. The |
| 352 | clipboard is distinct from the primary selection and secondary | ||
| 353 | selection discussed earlier. You can access the clipboard through the | ||
| 354 | @samp{Edit} menu of the menu bar (@pxref{Menu Bar}). | ||
| 355 | 355 | ||
| 356 | The command @kbd{M-x menu-bar-enable-clipboard} makes the @code{Cut}, | 356 | @cindex cut |
| 357 | @code{Paste} and @code{Copy} menu items, as well as the keys of the same | 357 | @findex clipboard-kill-region |
| 358 | names, all use the clipboard. | 358 | The command @code{clipboard-kill-region}, which is bound to the |
| 359 | @code{Cut} menu item, kills the region and saves it in the clipboard. | ||
| 359 | 360 | ||
| 360 | You can customize the variable @code{x-select-enable-clipboard} to make | 361 | @cindex copy |
| 361 | the Emacs yank functions consult the clipboard before the primary | 362 | @findex clipboard-kill-ring-save |
| 363 | The command @code{clipboard-kill-ring-save}, which is bound to the | ||
| 364 | @code{Copy} menu item, copies the region to the kill ring and saves it | ||
| 365 | in the clipboard. | ||
| 366 | |||
| 367 | @cindex paste | ||
| 368 | The @code{Paste} menu item in the Edit menu yanks the contents of | ||
| 369 | the clipboard at point. | ||
| 370 | |||
| 371 | @vindex x-select-enable-clipboard | ||
| 372 | You can customize the variable @code{x-select-enable-clipboard} to | ||
| 373 | make the Emacs yank functions consult the clipboard before the primary | ||
| 362 | selection, and to make the kill functions to store in the clipboard as | 374 | selection, and to make the kill functions to store in the clipboard as |
| 363 | well as the primary selection. Otherwise they do not access the | 375 | well as the primary selection. Otherwise, these commands do not |
| 364 | clipboard at all. Using the clipboard is the default on MS-Windows and Mac, | 376 | access the clipboard at all. Using the clipboard is the default on |
| 365 | but not on other systems. | 377 | MS-Windows and Mac OS, but not on other systems. |
| 366 | 378 | ||
| 367 | @node Mouse References | 379 | @node Mouse References |
| 368 | @section Following References with the Mouse | 380 | @section Following References with the Mouse |
| 369 | @kindex Mouse-1 @r{(selection)} | 381 | @kindex Mouse-1 @r{(selection)} |
| 370 | @kindex Mouse-2 @r{(selection)} | 382 | @kindex Mouse-2 @r{(selection)} |
| 371 | 383 | ||
| 372 | Some read-only Emacs buffers include references you can follow, or | 384 | Some Emacs buffers include references you can follow, or commands |
| 373 | commands you can activate. These include names of files, of buffers, | 385 | you can activate. These include names of files, of buffers, of |
| 374 | of possible completions, of matches for a pattern, as well as the | 386 | possible completions, of matches for a pattern, as well as the buttons |
| 375 | buttons in Help buffers and customization buffers. You can follow the | 387 | in Help buffers and customization buffers. You can follow the |
| 376 | reference or activate the command by moving point to it and typing | 388 | reference or activate the command by moving point to it and typing |
| 377 | @key{RET}. You can also do this with the mouse, using either | 389 | @key{RET}. You can also do this with the mouse, using either |
| 378 | @kbd{Mouse-1} or @kbd{Mouse-2}. | 390 | @kbd{Mouse-1} or @kbd{Mouse-2}. |