aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/frames.texi130
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
236between Emacs and other X applications using the @dfn{primary 236transfer text between Emacs and other X applications using the
237selection}. The primary selection is sometimes also referred to as 237@dfn{primary selection} (also called the @dfn{X selection}). This is
238the @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 239facility used on desktop environments such as Gnome, and on operating
240as Gnome, and on operating systems such as Microsoft Windows 240systems 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
244clicking the mouse (@pxref{Mouse Commands}), it is also saved in the 243clicking the mouse (@pxref{Mouse Commands}), it is also saved in the
@@ -254,12 +253,17 @@ contents of the primary selection are lost.
254such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in 253such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in
255the primary selection. @xref{Killing}. 254the 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
258is not saved to the primary selection. However, if you change the 259is not normally saved to the primary selection. However, if you
259variable @code{select-active-regions} to @code{t}, the region is 260change the variable @code{select-active-regions} to @code{t}, the
260automatically saved to the primary selection each time you activate 261region is saved to the primary selection each time you activate the
261the mark (however, the primary selection is @emph{not} updated if you 262mark (the primary selection is @emph{not} updated if you subsequently
262subsequently change the region by moving point). 263change the region by moving point). If you change the variable
264@code{yank-pop-change-selection} to @code{t}, rotating the kill ring
265with @kbd{M-y} (@code{yank-pop}) also saves the new yank to the
266primary 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
294the X Window System. It does not use point or the mark, so you can 298second similar facility known as the @dfn{secondary selection}.
295use it to kill text without setting point or the mark. 299Nowadays, few X applications make use of the secondary selection, but
300you 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}
301Set the secondary selection, with one end at the place where you press 306Set the secondary selection, with one end at the place where you press
302down the button, and the other end at the place where you release it 307down 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
304you drag. You can control the appearance of the highlighting by 309the @code{secondary-selection} face, as you drag. The window scrolls
305customizing the @code{secondary-selection} face (@pxref{Face 310automatically if you drag the mouse off the top or bottom of the
306Customization}). 311window, just like @code{mouse-set-region} (@pxref{Mouse Commands}).
307 312
308If you move the mouse off the top or bottom of the window while 313This command does not alter the kill ring.
309dragging, the window scrolls at a steady rate until you move the mouse
310back into the window. This way, you can mark regions that don't fit
311entirely on the screen.
312
313This 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}
318Set one endpoint for the @dfn{secondary selection} 318Set 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}
324Make a secondary selection, using the place specified with @kbd{M-Mouse-1} 324Set the secondary selection, with one end at the position clicked and
325as the other end (@code{mouse-secondary-save-then-kill}). This also 325the other at the position specified with @kbd{M-Mouse-1}
326puts 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
327text in the kill ring. A second @kbd{M-@key{Mouse-3}} at the same
327place kills the secondary selection just made. 328place 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}
332Insert the secondary selection where you click 333Insert the secondary selection where you click, placing point at the
333(@code{mouse-yank-secondary}). This places point at the end of the 334end of the yanked text (@code{mouse-yank-secondary}).
334yanked text.
335@end table 335@end table
336 336
337Double or triple clicking of @kbd{M-Mouse-1} operates on words and 337Double or triple clicking of @kbd{M-@key{Mouse-1}} operates on words
338lines, much like @kbd{Mouse-1}. 338and lines, much like @key{Mouse-1}.
339 339
340If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-Mouse-2} yanks 340If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-@key{Mouse-2}}
341at point. Then it does not matter precisely where you click, or even 341yanks at point. Then it does not matter precisely where you click, or
342which of the frame's windows you click on. @xref{Mouse Commands}. 342even which of the frame's windows you click on. @xref{Mouse
343Commands}.
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
353handle the @dfn{clipboard} selection type which is used by some 350Microsoft Windows and Mac OS X, you can transfer data (usually text)
354desktop environments, such as Gnome. 351between different applications using the @dfn{clipboard}. The
352clipboard is distinct from the primary selection and secondary
353selection 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
358names, 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
361the 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
365in the clipboard.
366
367@cindex paste
368 The @code{Paste} menu item in the Edit menu yanks the contents of
369the clipboard at point.
370
371@vindex x-select-enable-clipboard
372 You can customize the variable @code{x-select-enable-clipboard} to
373make the Emacs yank functions consult the clipboard before the primary
362selection, and to make the kill functions to store in the clipboard as 374selection, and to make the kill functions to store in the clipboard as
363well as the primary selection. Otherwise they do not access the 375well as the primary selection. Otherwise, these commands do not
364clipboard at all. Using the clipboard is the default on MS-Windows and Mac, 376access the clipboard at all. Using the clipboard is the default on
365but not on other systems. 377MS-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
373commands you can activate. These include names of files, of buffers, 385you can activate. These include names of files, of buffers, of
374of possible completions, of matches for a pattern, as well as the 386possible completions, of matches for a pattern, as well as the buttons
375buttons in Help buffers and customization buffers. You can follow the 387in Help buffers and customization buffers. You can follow the
376reference or activate the command by moving point to it and typing 388reference 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}.