Mercurial > emacs
annotate doc/emacs/frames.texi @ 98854:3045af7ce2cb
(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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 19 Oct 2008 05:00:18 +0000 |
parents | a0d8754b4079 |
children | 4ce02f730f61 |
rev | line source |
---|---|
84242 | 1 @c This is part of the Emacs manual. |
2 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1999, 2000, | |
87903 | 3 @c 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
84242 | 4 @c See file emacs.texi for copying conditions. |
5 @node Frames, International, Windows, Top | |
6 @chapter Frames and Graphical Displays | |
7 @cindex frames | |
8 | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
9 When using a graphical display, you can create multiple system-level |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
10 ``windows'' in a single Emacs session. We refer to these system-level |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
11 windows as @dfn{frames}. A frame initially contains a single Emacs |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
12 window; however, you can subdivide this Emacs window into smaller |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
13 windows, all fitting into the same frame. Each frame normally |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
14 contains its own echo area and minibuffer. |
84242 | 15 |
16 To avoid confusion, we reserve the word ``window'' for the | |
17 subdivisions that Emacs implements, and never use it to refer to a | |
18 frame. | |
19 | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
20 Any editing you do in one frame affects the other frames. For |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
21 instance, if you put text in the kill ring in one frame, you can yank |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
22 it in another frame. If you exit Emacs through @kbd{C-x C-c} in one |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
23 frame, it terminates all the frames. To delete just one frame, use |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
24 @kbd{C-x 5 0} (that is zero, not @kbd{o}). |
84242 | 25 |
26 Emacs compiled for MS-DOS emulates some windowing functionality, | |
27 so that you can use many of the features described in this chapter. | |
28 @iftex | |
29 @xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}. | |
30 @end iftex | |
31 @ifnottex | |
32 @xref{MS-DOS Mouse}. | |
33 @end ifnottex | |
34 | |
35 @menu | |
36 * Cut and Paste:: Mouse commands for cut and paste. | |
37 * Mouse References:: Using the mouse to select an item from a list. | |
38 * Menu Mouse Clicks:: Mouse clicks that bring up menus. | |
39 * Mode Line Mouse:: Mouse clicks on the mode line. | |
40 * Creating Frames:: Creating additional Emacs frames with various contents. | |
41 * Frame Commands:: Iconifying, deleting, and switching frames. | |
42 * Speedbar:: How to make and use a speedbar frame. | |
43 * Multiple Displays:: How one Emacs job can talk to several displays. | |
44 * Special Buffer Frames:: You can make certain buffers have their own frames. | |
45 * Frame Parameters:: Changing the colors and other modes of frames. | |
46 * Scroll Bars:: How to enable and disable scroll bars; how to use them. | |
47 * Wheeled Mice:: Using mouse wheels for scrolling. | |
48 * Drag and Drop:: Using drag and drop to open files and insert text. | |
49 * Menu Bars:: Enabling and disabling the menu bar. | |
50 * Tool Bars:: Enabling and disabling the tool bar. | |
51 * Dialog Boxes:: Controlling use of dialog boxes. | |
52 * Tooltips:: Displaying information at the current mouse position. | |
53 * Mouse Avoidance:: Moving the mouse pointer out of the way. | |
54 * Non-Window Terminals:: Multiple frames on terminals that show only one. | |
55 * Text-Only Mouse:: Using the mouse in text-only terminals. | |
56 @end menu | |
57 | |
58 @node Cut and Paste | |
59 @section Killing and Yanking on Graphical Displays | |
60 | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
61 This section describes commands for selecting a region, killing, and |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
62 yanking using the mouse. |
84242 | 63 |
64 @menu | |
65 * Mouse Commands:: Moving, cutting, and pasting, with the mouse. | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
66 * Word and Line Mouse:: Mouse commands for selecting whole words or lines. |
84242 | 67 * Cut/Paste Other App:: Transfering text between Emacs and other apps. |
68 * Secondary Selection:: Cutting without altering point and mark. | |
69 * Clipboard:: Using the clipboard for selections. | |
70 @end menu | |
71 | |
72 @node Mouse Commands | |
73 @subsection Mouse Commands for Editing | |
74 @cindex mouse buttons (what they do) | |
75 | |
76 @kindex Mouse-1 | |
77 @kindex Mouse-2 | |
78 @kindex Mouse-3 | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
79 @table @key |
84242 | 80 @item Mouse-1 |
81 Move point to where you click (@code{mouse-set-point}). | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
82 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
83 @item Drag-Mouse-1 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
84 Activate the region around the text selected by dragging, and copy it |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
85 to the kill ring (@code{mouse-set-region}). |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
86 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
87 @item Mouse-2 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
88 Yank the last killed text at the click position |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
89 (@code{mouse-yank-at-click}). |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
90 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
91 @item Mouse-3 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
92 If the region is active, move the nearer end of the region to the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
93 click position; otherwise, set mark at the current value of point and |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
94 point at the click position. Save the resulting region in the kill |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
95 ring; on a second click, kill it (@code{mouse-save-then-kill}). |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
96 @end table |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
97 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
98 @findex mouse-set-point |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
99 The most basic mouse command is @code{mouse-set-point}, which is |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
100 called by clicking with the left mouse button, @key{Mouse-1}, in the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
101 text area of a window. This moves point to the position where you |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
102 clicked. |
84242 | 103 |
104 @vindex x-mouse-click-focus-ignore-position | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
105 Normally, Emacs does not distinguish between ordinary mouse clicks |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
106 and clicks that select a frame. When you click on a frame to select |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
107 it, that also changes the selected window and cursor position |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
108 according to the mouse click position. On the X window system, you |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
109 can change this behavior by setting the variable |
84242 | 110 @code{x-mouse-click-focus-ignore-position} to @code{t}. Then the |
111 first click selects the frame, but does not affect the selected window | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
112 or cursor position. If you click again in the same place, that click |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
113 will be in the selected frame, so it will change the window or cursor |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
114 position. |
84242 | 115 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
116 @findex mouse-set-region |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
117 @vindex mouse-drag-copy-region |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
118 Holding down @key{Mouse-1} and ``dragging'' the mouse over a stretch |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
119 of text activates the region around that text |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
120 (@code{mouse-set-region}). @xref{Mark}. Emacs places the mark where |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
121 you started holding down the mouse button, and point where you release |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
122 it. In addition, the region is copied into the kill ring (@pxref{Kill |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
123 Ring}). If you don't want Emacs to copy the region, change the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
124 variable @code{mouse-drag-copy-region} to @code{nil}. |
84242 | 125 |
126 @vindex mouse-scroll-min-lines | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
127 If you move the mouse off the top or bottom of the window while |
84242 | 128 dragging, the window scrolls at a steady rate until you move the mouse |
129 back into the window. This way, you can select regions that don't fit | |
130 entirely on the screen. The number of lines scrolled per step depends | |
131 on how far away from the window edge the mouse has gone; the variable | |
132 @code{mouse-scroll-min-lines} specifies a minimum step size. | |
133 | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
134 @findex mouse-yank-at-click |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
135 @vindex mouse-yank-at-point |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
136 Clicking with the middle mouse button, @key{Mouse-2}, moves point to |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
137 the position where you clicked and performs a yank |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
138 (@code{mouse-yank-at-click}). @xref{Yanking}. If you change the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
139 variable @code{mouse-yank-at-point} to a non-@code{nil} value, |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
140 @kbd{Mouse-2} does not move point. Then it does not matter where you |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
141 click, or even which of the frame's windows you click on; the yank |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
142 occurs at the existing point. This variable also affects yanking the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
143 primary and secondary selections (@pxref{Cut/Paste Other App}). |
84242 | 144 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
145 @findex mouse-save-then-kill |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
146 Clicking with the right mouse button, @key{Mouse-3}, runs the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
147 command @code{mouse-save-then-kill}. This performs several actions |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
148 depending on where you click and the status of the region: |
84242 | 149 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
150 @itemize @bullet |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
151 @item |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
152 If no region is active, clicking @key{Mouse-3} activates the region, |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
153 placing the mark where point was and point at the clicked position. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
154 In addition, the text in the region is copied to the kill ring. |
84242 | 155 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
156 @item |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
157 If a region is active, clicking @key{Mouse-3} adjusts the nearer end |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
158 of the region by moving it to the clicked position. The adjusted |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
159 region's text is copied to the kill ring; if the text in the original |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
160 region was already on the kill ring, it replaces it there. |
84242 | 161 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
162 @item |
84242 | 163 If you originally specified the region using a double or triple |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
164 @key{Mouse-1}, so that the region is defined to consist of entire |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
165 words or lines, then adjusting the region with @key{Mouse-3} also |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
166 proceeds by entire words or lines. |
84242 | 167 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
168 @item |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
169 If you use @key{Mouse-3} a second time consecutively, at the same |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
170 place, that kills the region already selected. Thus, the simplest way |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
171 to kill text with the mouse is to click @key{Mouse-1} at one end, then |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
172 click @key{Mouse-3} twice at the other end. To copy the text into the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
173 kill ring without deleting it from the buffer, press @key{Mouse-3} |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
174 just once---or just drag across the text with @key{Mouse-1}. Then you |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
175 can copy it elsewhere by yanking it. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
176 @end itemize |
84242 | 177 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
178 Whenever you set the region using any of the mouse commands |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
179 described above, the mark will be deactivated by any subsequent |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
180 unshifted cursor motion command, in addition to the usual ways of |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
181 deactivating the mark. @xref{Shift Selection}. While the region |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
182 remains active, typing @key{Backspace} or @key{Delete} deletes the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
183 text in that region and deactivates the mark; this behavior follows a |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
184 convention established by other graphical programs, and it does |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
185 @emph{not} apply when you set the region any other way, including |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
186 shift-selection (@pxref{Shift Selection}). |
84242 | 187 |
188 @cindex Delete Selection mode | |
189 @cindex mode, Delete Selection | |
190 @findex delete-selection-mode | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
191 Many graphical applications also follow the convention that |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
192 insertion while text is selected deletes the selected text. You can |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
193 make Emacs behave this way by typing @kbd{M-x delete-selection-mode}. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
194 This enables a minor mode named Delete Selection mode. Another effect |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
195 of this mode is that some keys, such as @key{DEL} and @kbd{C-d}, |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
196 always kill the region if one exists. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
197 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
198 @node Word and Line Mouse |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
199 @subsection Mouse Commands for Words and Lines |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
200 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
201 These variants of @kbd{Mouse-1} select entire words or lines at a |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
202 time. Emacs activates the region around the selected text, which is |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
203 also copied to the kill ring. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
204 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
205 @table @kbd |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
206 @item Double-Mouse-1 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
207 Select the text around the word which you click on. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
208 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
209 Double-clicking on a character with ``symbol'' syntax (such as |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
210 underscore, in C mode) selects the symbol surrounding that character. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
211 Double-clicking on a character with open- or close-parenthesis syntax |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
212 selects the parenthetical grouping which that character starts or |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
213 ends. Double-clicking on a character with string-delimiter syntax |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
214 (such as a singlequote or doublequote in C) selects the string |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
215 constant (Emacs uses heuristics to figure out whether that character |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
216 is the beginning or the end of it). |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
217 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
218 @item Double-Drag-Mouse-1 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
219 Select the text you drag across, in the form of whole words. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
220 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
221 @item Triple-Mouse-1 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
222 Select the line you click on. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
223 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
224 @item Triple-Drag-Mouse-1 |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
225 Select the text you drag across, in the form of whole lines. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
226 @end table |
84242 | 227 |
228 @node Cut/Paste Other App | |
229 @subsection Cut and Paste with Other Window Applications | |
230 | |
231 @cindex X cutting and pasting | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
232 @cindex X selection |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
233 @cindex primary selection |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
234 @cindex selection, primary |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
235 When running Emacs under the X window system, you can easily |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
236 transfer text between Emacs and other X applications using the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
237 @dfn{primary selection} (also called the @dfn{X selection}). This is |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
238 @emph{not} the same thing as the @dfn{clipboard}, which is a separate |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
239 facility used on desktop environments such as Gnome, and on operating |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
240 systems such as Microsoft Windows (@pxref{Clipboard}). |
84242 | 241 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
242 Under X, whenever you select some text in Emacs by dragging or |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
243 clicking the mouse (@pxref{Mouse Commands}), it is also saved in the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
244 primary selection. You can then @dfn{paste} that text into any other |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
245 X application, usually by clicking @key{Mouse-2} in that application. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
246 Unlike the Emacs kill ring (@pxref{Kill Ring}), the primary selection |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
247 has no ``memory'': each time you save something in the primary |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
248 selection, either in Emacs or in another X application, the previous |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
249 contents of the primary selection are lost. |
84242 | 250 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
251 Whenever you kill some text using a command such as @kbd{C-w} |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
252 (@code{kill-region}), or copy it into the kill ring using a command |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
253 such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
254 the primary selection. @xref{Killing}. |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
255 |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
256 @vindex select-active-regions |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
257 @vindex yank-pop-change-selection |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
258 If you set the region using the keyboard, the text within the region |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
259 is not normally saved to the primary selection. However, if you |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
260 change the variable @code{select-active-regions} to @code{t}, the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
261 region is saved to the primary selection each time you activate the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
262 mark (the primary selection is @emph{not} updated if you subsequently |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
263 change the region by moving point). If you change the variable |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
264 @code{yank-pop-change-selection} to @code{t}, rotating the kill ring |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
265 with @kbd{M-y} (@code{yank-pop}) also saves the new yank to the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
266 primary selection (@pxref{Yanking}). |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
267 |
84242 | 268 @cindex cut buffer |
269 @vindex x-cut-buffer-max | |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
270 Whenever Emacs saves some text to the primary selection, it may also |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
271 save it to the @dfn{cut buffer}. The cut buffer is an obsolete |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
272 predecessor to the primary selection; most modern applications do not |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
273 make use of it. Because saving text to the cut buffer is slow and |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
274 inefficient, Emacs only does it if the text is shorter than the value |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
275 of @code{x-cut-buffer-max} (the default is 20000 characters). |
84242 | 276 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
277 You can yank the primary selection into Emacs using the usual yank |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
278 commands, such as @kbd{C-y} (@code{yank}) and @key{Mouse-2} |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
279 (@code{mouse-yank-at-click}). These commands actually check the |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
280 primary selection before referring to the kill ring; if no primary |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
281 selection is available, the kill ring contents are used. To prevent |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
282 yank commands from accessing the primary selection, set the variable |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
283 @code{x-select-enable-primary} to @code{nil}. |
84242 | 284 |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
285 The standard coding system for the primary selection is |
86138
1e3c83a62c3d
(Cut/Paste Other App): Mention x-select-request-type.
Kenichi Handa <handa@m17n.org>
parents:
85393
diff
changeset
|
286 @code{compound-text-with-extensions}. You may find that the pasted |
1e3c83a62c3d
(Cut/Paste Other App): Mention x-select-request-type.
Kenichi Handa <handa@m17n.org>
parents:
85393
diff
changeset
|
287 text is not what you expected. In such a case, you can specify |
98757
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
288 another coding system for the selection by typing @kbd{C-x @key{RET} |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
289 x} or @kbd{C-x @key{RET} X}. Alternatively, you can request a |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
290 different data type by modifying the variable |
a0d8754b4079
(Mouse Commands, Cut/Paste Other App): Rewrite.
Chong Yidong <cyd@stupidchicken.com>
parents:
93354
diff
changeset
|
291 @code{x-select-request-type}. @xref{Communication Coding}. |
84242 | 292 |
293 @node Secondary Selection | |
294 @subsection Secondary Selection | |
295 @cindex secondary selection | |
296 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
297 In addition to the primary selection, the X Window System provides a |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
298 second similar facility known as the @dfn{secondary selection}. |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
299 Nowadays, few X applications make use of the secondary selection, but |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
300 you can access it using the following Emacs commands: |
84242 | 301 |
302 @table @kbd | |
303 @findex mouse-set-secondary | |
304 @kindex M-Drag-Mouse-1 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
305 @item M-@key{Drag-Mouse-1} |
84242 | 306 Set the secondary selection, with one end at the place where you press |
307 down the button, and the other end at the place where you release it | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
308 (@code{mouse-set-secondary}). The selected text is highlighted, using |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
309 the @code{secondary-selection} face, as you drag. The window scrolls |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
310 automatically if you drag the mouse off the top or bottom of the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
311 window, just like @code{mouse-set-region} (@pxref{Mouse Commands}). |
84242 | 312 |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
313 This command does not alter the kill ring. |
84242 | 314 |
315 @findex mouse-start-secondary | |
316 @kindex M-Mouse-1 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
317 @item M-@key{Mouse-1} |
84242 | 318 Set one endpoint for the @dfn{secondary selection} |
319 (@code{mouse-start-secondary}). | |
320 | |
321 @findex mouse-secondary-save-then-kill | |
322 @kindex M-Mouse-3 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
323 @item M-@key{Mouse-3} |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
324 Set the secondary selection, with one end at the position clicked and |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
325 the other at the position specified with @kbd{M-Mouse-1} |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
326 (@code{mouse-secondary-save-then-kill}). This also puts the selected |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
327 text in the kill ring. A second @kbd{M-@key{Mouse-3}} at the same |
84242 | 328 place kills the secondary selection just made. |
329 | |
330 @findex mouse-yank-secondary | |
331 @kindex M-Mouse-2 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
332 @item M-@key{Mouse-2} |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
333 Insert the secondary selection where you click, placing point at the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
334 end of the yanked text (@code{mouse-yank-secondary}). |
84242 | 335 @end table |
336 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
337 Double or triple clicking of @kbd{M-@key{Mouse-1}} operates on words |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
338 and lines, much like @key{Mouse-1}. |
84242 | 339 |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
340 If @code{mouse-yank-at-point} is non-@code{nil}, @kbd{M-@key{Mouse-2}} |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
341 yanks at point. Then it does not matter precisely where you click, or |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
342 even which of the frame's windows you click on. @xref{Mouse |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
343 Commands}. |
84242 | 344 |
345 @node Clipboard | |
346 @subsection Using the Clipboard | |
347 @cindex clipboard | |
348 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
349 In desktop environments such as Gnome, and operating systems such as |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
350 Microsoft Windows and Mac OS X, you can transfer data (usually text) |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
351 between different applications using the @dfn{clipboard}. The |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
352 clipboard is distinct from the primary selection and secondary |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
353 selection discussed earlier. You can access the clipboard through the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
354 @samp{Edit} menu of the menu bar (@pxref{Menu Bar}). |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
355 |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
356 @cindex cut |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
357 @findex clipboard-kill-region |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
358 The command @code{clipboard-kill-region}, which is bound to the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
359 @code{Cut} menu item, kills the region and saves it in the clipboard. |
84242 | 360 |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
361 @cindex copy |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
362 @findex clipboard-kill-ring-save |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
363 The command @code{clipboard-kill-ring-save}, which is bound to the |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
364 @code{Copy} menu item, copies the region to the kill ring and saves it |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
365 in the clipboard. |
84242 | 366 |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
367 @cindex paste |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
368 The @code{Paste} menu item in the Edit menu yanks the contents of |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
369 the clipboard at point. |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
370 |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
371 @vindex x-select-enable-clipboard |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
372 You can customize the variable @code{x-select-enable-clipboard} to |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
373 make the Emacs yank functions consult the clipboard before the primary |
84242 | 374 selection, and to make the kill functions to store in the clipboard as |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
375 well as the primary selection. Otherwise, these commands do not |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
376 access the clipboard at all. Using the clipboard is the default on |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
377 MS-Windows and Mac OS, but not on other systems. |
84242 | 378 |
379 @node Mouse References | |
380 @section Following References with the Mouse | |
381 @kindex Mouse-1 @r{(selection)} | |
382 @kindex Mouse-2 @r{(selection)} | |
383 | |
98854
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
384 Some Emacs buffers include references you can follow, or commands |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
385 you can activate. These include names of files, of buffers, of |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
386 possible completions, of matches for a pattern, as well as the buttons |
3045af7ce2cb
(Cut/Paste Other App): Document yank-pop-change-selection.
Chong Yidong <cyd@stupidchicken.com>
parents:
98757
diff
changeset
|
387 in Help buffers and customization buffers. You can follow the |
84242 | 388 reference or activate the command by moving point to it and typing |
389 @key{RET}. You can also do this with the mouse, using either | |
390 @kbd{Mouse-1} or @kbd{Mouse-2}. | |
391 | |
392 Since yanking text into a read-only buffer is not allowed, these | |
393 buffers generally define @kbd{Mouse-2} to follow a reference or | |
394 activate a command. For example, if you click @kbd{Mouse-2} on a file | |
395 name in a Dired buffer, you visit that file. If you click | |
396 @kbd{Mouse-2} on an error message in the @samp{*Compilation*} buffer, | |
397 you go to the source code for that error message. If you click | |
398 @kbd{Mouse-2} on a completion in the @samp{*Completions*} buffer, you | |
399 choose that completion. | |
400 | |
401 However, most applications use @kbd{Mouse-1} to do this sort of | |
402 thing, so Emacs implements this too. If you click @kbd{Mouse-1} | |
403 quickly on a reference or button, it follows or activates. If you | |
404 click slowly, it moves point as usual. Dragging, meaning moving the | |
405 mouse while it is held down, also has its usual behavior of setting | |
406 the region. | |
407 | |
408 @vindex mouse-1-click-in-non-selected-windows | |
409 Normally, the @kbd{Mouse-1} click behavior is performed on links in | |
410 any window. The variable @code{mouse-1-click-in-non-selected-windows} | |
411 controls whether @kbd{Mouse-1} has this behavior even in non-selected | |
412 windows, or only in the selected window. | |
413 | |
414 @vindex mouse-highlight | |
415 You can usually tell when @kbd{Mouse-1} and @kbd{Mouse-2} have this | |
416 special sort of meaning because the sensitive text highlights when you | |
417 move the mouse over it. The variable @code{mouse-highlight} controls | |
418 whether to do this highlighting always (even when such text appears | |
419 where the mouse already is), never, or only immediately after you move | |
420 the mouse. | |
421 | |
422 @vindex mouse-1-click-follows-link | |
423 In Emacs versions before 22, only @kbd{Mouse-2} follows links and | |
424 @kbd{Mouse-1} always sets point. If you prefer this older behavior, | |
425 set the variable @code{mouse-1-click-follows-link} to @code{nil}. | |
426 This variable also lets you choose various other alternatives for | |
427 following links with the mouse. Type @kbd{C-h v | |
428 mouse-1-click-follows-link @key{RET}} for more details. | |
429 | |
430 @node Menu Mouse Clicks | |
431 @section Mouse Clicks for Menus | |
432 | |
433 Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers | |
434 bring up menus. | |
435 | |
436 @table @kbd | |
437 @item C-Mouse-1 | |
438 @kindex C-Mouse-1 | |
439 This menu is for selecting a buffer. | |
440 | |
441 The MSB (``mouse select buffer'') global minor mode makes this | |
442 menu smarter and more customizable. @xref{Buffer Menus}. | |
443 | |
444 @item C-Mouse-2 | |
445 @kindex C-Mouse-2 | |
446 This menu is for specifying faces and other text properties | |
447 for editing formatted text. @xref{Formatted Text}. | |
448 | |
449 @item C-Mouse-3 | |
450 @kindex C-Mouse-3 | |
451 This menu is mode-specific. For most modes if Menu-bar mode is on, | |
452 this menu has the same items as all the mode-specific menu-bar menus | |
453 put together. Some modes may specify a different menu for this | |
454 button.@footnote{Some systems use @kbd{Mouse-3} for a mode-specific | |
455 menu. We took a survey of users, and found they preferred to keep | |
456 @kbd{Mouse-3} for selecting and killing regions. Hence the decision | |
457 to use @kbd{C-Mouse-3} for this menu. To use @kbd{Mouse-3} instead, | |
458 do @code{(global-set-key [mouse-3] 'mouse-popup-menubar-stuff)}.} If | |
459 Menu-bar mode is off, this menu contains all the items which would be | |
460 present in the menu bar---not just the mode-specific ones---so that | |
461 you can access them without having to display the menu bar. | |
462 | |
463 @item S-Mouse-1 | |
464 This menu is for specifying the frame's default font. | |
465 @end table | |
466 | |
467 @node Mode Line Mouse | |
468 @section Mode Line Mouse Commands | |
469 @cindex mode line, mouse | |
470 @cindex mouse on mode line | |
471 | |
472 You can use mouse clicks on window mode lines to select and manipulate | |
473 windows. | |
474 | |
85393
9040ce19727b
(Mode Line Mouse): Mention minor mode names.
Glenn Morris <rgm@gnu.org>
parents:
84242
diff
changeset
|
475 Some areas of the mode line, such as the buffer name, and major and minor |
9040ce19727b
(Mode Line Mouse): Mention minor mode names.
Glenn Morris <rgm@gnu.org>
parents:
84242
diff
changeset
|
476 mode names, have their own special mouse bindings. These areas are |
84242 | 477 highlighted when you hold the mouse over them, and information about |
478 the special bindings will be displayed (@pxref{Tooltips}). This | |
479 section's commands do not apply in those areas. | |
480 | |
481 @table @kbd | |
482 @item Mouse-1 | |
483 @kindex Mouse-1 @r{(mode line)} | |
484 @kbd{Mouse-1} on a mode line selects the window it belongs to. By | |
485 dragging @kbd{Mouse-1} on the mode line, you can move it, thus | |
486 changing the height of the windows above and below. Changing heights | |
487 with the mouse in this way never deletes windows, it just refuses to | |
488 make any window smaller than the minimum height. | |
489 | |
490 @item Mouse-2 | |
491 @kindex Mouse-2 @r{(mode line)} | |
492 @kbd{Mouse-2} on a mode line expands that window to fill its frame. | |
493 | |
494 @item Mouse-3 | |
495 @kindex Mouse-3 @r{(mode line)} | |
496 @kbd{Mouse-3} on a mode line deletes the window it belongs to. If the | |
497 frame has only one window, it buries the current buffer instead, and | |
498 switches to another buffer. | |
499 | |
500 @item C-Mouse-2 | |
501 @kindex C-mouse-2 @r{(mode line)} | |
502 @kbd{C-Mouse-2} on a mode line splits the window above | |
503 horizontally, above the place in the mode line where you click. | |
504 @end table | |
505 | |
506 @kindex C-Mouse-2 @r{(scroll bar)} | |
507 @kindex Mouse-1 @r{(scroll bar)} | |
508 Using @kbd{Mouse-1} on the divider between two side-by-side mode | |
509 lines, you can move the vertical boundary left or right. Using | |
510 @kbd{C-Mouse-2} on a scroll bar splits the corresponding window | |
511 vertically. @xref{Split Window}. | |
512 | |
513 @node Creating Frames | |
514 @section Creating Frames | |
515 @cindex creating frames | |
516 | |
517 @kindex C-x 5 | |
518 The prefix key @kbd{C-x 5} is analogous to @kbd{C-x 4}, with parallel | |
519 subcommands. The difference is that @kbd{C-x 5} commands create a new | |
520 frame rather than just a new window in the selected frame (@pxref{Pop | |
521 Up Window}). If an existing visible or iconified frame already displays | |
522 the requested material, these commands use the existing frame, after | |
523 raising or deiconifying as necessary. | |
524 | |
525 The various @kbd{C-x 5} commands differ in how they find or create the | |
526 buffer to select: | |
527 | |
528 @table @kbd | |
529 @item C-x 5 2 | |
530 @kindex C-x 5 2 | |
531 @findex make-frame-command | |
532 Create a new frame (@code{make-frame-command}). | |
533 @item C-x 5 b @var{bufname} @key{RET} | |
534 Select buffer @var{bufname} in another frame. This runs | |
535 @code{switch-to-buffer-other-frame}. | |
536 @item C-x 5 f @var{filename} @key{RET} | |
537 Visit file @var{filename} and select its buffer in another frame. This | |
538 runs @code{find-file-other-frame}. @xref{Visiting}. | |
539 @item C-x 5 d @var{directory} @key{RET} | |
540 Select a Dired buffer for directory @var{directory} in another frame. | |
541 This runs @code{dired-other-frame}. @xref{Dired}. | |
542 @item C-x 5 m | |
543 Start composing a mail message in another frame. This runs | |
544 @code{mail-other-frame}. It is the other-frame variant of @kbd{C-x m}. | |
545 @xref{Sending Mail}. | |
546 @item C-x 5 . | |
547 Find a tag in the current tag table in another frame. This runs | |
548 @code{find-tag-other-frame}, the multiple-frame variant of @kbd{M-.}. | |
549 @xref{Tags}. | |
550 @item C-x 5 r @var{filename} @key{RET} | |
551 @kindex C-x 5 r | |
552 @findex find-file-read-only-other-frame | |
553 Visit file @var{filename} read-only, and select its buffer in another | |
554 frame. This runs @code{find-file-read-only-other-frame}. | |
555 @xref{Visiting}. | |
556 @end table | |
557 | |
558 @cindex default-frame-alist | |
559 @cindex initial-frame-alist | |
560 @cindex face customization, in @file{~/.emacs} | |
561 @cindex color customization, in @file{~/.emacs} | |
562 You can control the appearance of new frames you create by setting the | |
563 frame parameters in @code{default-frame-alist}. You can use the | |
564 variable @code{initial-frame-alist} to specify parameters that affect | |
565 only the initial frame. @xref{Initial Parameters,,, elisp, The Emacs | |
566 Lisp Reference Manual}, for more information. | |
567 | |
568 @cindex font (default) | |
569 The easiest way to specify the principal font for all your Emacs | |
570 frames is with an X resource (@pxref{Font X}), but you can also do it by | |
571 modifying @code{default-frame-alist} to specify the @code{font} | |
572 parameter, as shown here: | |
573 | |
574 @example | |
575 (add-to-list 'default-frame-alist '(font . "10x20")) | |
576 @end example | |
577 | |
578 @noindent | |
579 Here's a similar example for specifying a foreground color: | |
580 | |
581 @example | |
582 (add-to-list 'default-frame-alist '(foreground-color . "blue")) | |
583 @end example | |
584 | |
585 @noindent | |
586 By putting such customizations in your @file{~/.emacs} init file, you | |
587 can control the appearance of all the frames Emacs creates, including | |
588 the initial one. | |
589 | |
590 @node Frame Commands | |
591 @section Frame Commands | |
592 | |
593 The following commands let you create, delete and operate on frames: | |
594 | |
595 @table @kbd | |
596 @item C-z | |
597 @kindex C-z @r{(X windows)} | |
598 @findex iconify-or-deiconify-frame | |
599 Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}). | |
600 When typed on an Emacs frame's icon, deiconify instead. | |
601 | |
602 The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under | |
603 a graphical display that allows multiple applications to operate | |
604 simultaneously in their own windows, so Emacs gives @kbd{C-z} a | |
605 different binding in that case. | |
606 | |
607 @item C-x 5 0 | |
608 @kindex C-x 5 0 | |
609 @findex delete-frame | |
610 Delete the selected frame (@code{delete-frame}). This is not allowed if | |
611 there is only one frame. | |
612 | |
613 @item C-x 5 o | |
614 @kindex C-x 5 o | |
615 @findex other-frame | |
616 Select another frame, raise it, and warp the mouse to it so that it | |
617 stays selected. If you repeat this command, it cycles through all the | |
618 frames on your terminal. | |
619 | |
620 @item C-x 5 1 | |
621 @kindex C-x 5 1 | |
622 @findex delete-other-frames | |
623 Delete all frames except the selected one. | |
624 @end table | |
625 | |
626 @vindex focus-follows-mouse | |
627 To make the command @kbd{C-x 5 o} work properly, you must tell Emacs | |
628 how the system (or the window manager) generally handles | |
629 focus-switching between windows. There are two possibilities: either | |
630 simply moving the mouse onto a window selects it (gives it focus), or | |
631 you have to click on it in a suitable way to do so. On X, this focus | |
632 policy also affects whether the focus is given to a frame that Emacs | |
633 raises. Unfortunately there is no way Emacs can find out | |
634 automatically which way the system handles this, so you have to | |
635 explicitly say, by setting the variable @code{focus-follows-mouse}. | |
636 If just moving the mouse onto a window selects it, that variable | |
637 should be @code{t}; if a click is necessary, the variable should be | |
638 @code{nil}. | |
639 | |
640 The window manager that is part of MS-Windows always gives focus to a | |
641 frame that raises, so this variable has no effect in the native | |
642 MS-Windows build of Emacs. | |
643 | |
644 @node Speedbar | |
645 @section Speedbar Frames | |
646 @cindex speedbar | |
647 | |
648 @cindex attached frame (of speedbar) | |
649 The @dfn{speedbar} is a special frame for conveniently navigating in | |
650 or operating on another frame. The speedbar, when it exists, is | |
651 always associated with a specific frame, called its @dfn{attached | |
652 frame}; all speedbar operations act on that frame. | |
653 | |
654 Type @kbd{M-x speedbar} to create the speedbar and associate it with | |
655 the current frame. To dismiss the speedbar, type @kbd{M-x speedbar} | |
656 again, or select the speedbar and type @kbd{q}. (You can also delete | |
657 the speedbar frame like any other Emacs frame.) If you wish to | |
658 associate the speedbar with a different frame, dismiss it and call | |
659 @kbd{M-x speedbar} from that frame. | |
660 | |
661 The speedbar can operate in various modes. Its default mode is | |
662 @dfn{File Display} mode, which shows the files in the current | |
663 directory of the selected window of the attached frame, one file per | |
664 line. Clicking on a file name visits that file in the selected window | |
665 of the attached frame, and clicking on a directory name shows that | |
666 directory in the speedbar (@pxref{Mouse References}). Each line also | |
667 has a box, @samp{[+]} or @samp{<+>}, that you can click on to | |
668 @dfn{expand} the contents of that item. Expanding a directory adds | |
669 the contents of that directory to the speedbar display, underneath the | |
670 directory's own line. Expanding an ordinary file adds a list of the | |
671 tags in that file to the speedbar display; you can click on a tag name | |
672 to jump to that tag in the selected window of the attached frame. | |
673 When a file or directory is expanded, the @samp{[+]} changes to | |
674 @samp{[-]}; you can click on that box to @dfn{contract} the item, | |
675 hiding its contents. | |
676 | |
677 You navigate through the speedbar using the keyboard, too. Typing | |
678 @kbd{RET} while point is on a line in the speedbar is equivalent to | |
679 clicking the item on the current line, and @kbd{SPC} expands or | |
680 contracts the item. @kbd{U} displays the parent directory of the | |
681 current directory. To copy, delete, or rename the file on the current | |
682 line, type @kbd{C}, @kbd{D}, and @kbd{R} respectively. To create a | |
683 new directory, type @kbd{M}. | |
684 | |
685 Another general-purpose speedbar mode is @dfn{Buffer Display} mode; | |
686 in this mode, the speedbar displays a list of Emacs buffers. To | |
687 switch to this mode, type @kbd{b} in the speedbar. To return to File | |
688 Display mode, type @kbd{f}. You can also change the display mode by | |
689 clicking @kbd{mouse-3} anywhere in the speedbar window (or | |
690 @kbd{mouse-1} on the mode-line) and selecting @samp{Displays} in the | |
691 pop-up menu. | |
692 | |
693 Some major modes, including Rmail mode, Info, and GUD, have | |
694 specialized ways of putting useful items into the speedbar for you to | |
695 select. For example, in Rmail mode, the speedbar shows a list of Rmail | |
696 files, and lets you move the current message to another Rmail file by | |
697 clicking on its @samp{<M>} box. | |
698 | |
699 For more details on using and programming the speedbar, @xref{Top, | |
700 Speedbar,,speedbar, Speedbar Manual}. | |
701 | |
702 @node Multiple Displays | |
703 @section Multiple Displays | |
704 @cindex multiple displays | |
705 | |
706 A single Emacs can talk to more than one X display. Initially, Emacs | |
707 uses just one display---the one specified with the @env{DISPLAY} | |
708 environment variable or with the @samp{--display} option (@pxref{Initial | |
709 Options}). To connect to another display, use the command | |
710 @code{make-frame-on-display}: | |
711 | |
712 @findex make-frame-on-display | |
713 @table @kbd | |
714 @item M-x make-frame-on-display @key{RET} @var{display} @key{RET} | |
715 Create a new frame on display @var{display}. | |
716 @end table | |
717 | |
718 A single X server can handle more than one screen. When you open | |
719 frames on two screens belonging to one server, Emacs knows they share a | |
720 single keyboard, and it treats all the commands arriving from these | |
721 screens as a single stream of input. | |
722 | |
723 When you open frames on different X servers, Emacs makes a separate | |
724 input stream for each server. This way, two users can type | |
725 simultaneously on the two displays, and Emacs will not garble their | |
726 input. Each server also has its own selected frame. The commands you | |
727 enter with a particular X server apply to that server's selected frame. | |
728 | |
729 Despite these features, people using the same Emacs job from different | |
730 displays can still interfere with each other if they are not careful. | |
731 For example, if any one types @kbd{C-x C-c}, that exits the Emacs job | |
732 for all of them! | |
733 | |
734 @node Special Buffer Frames | |
735 @section Special Buffer Frames | |
736 | |
737 @vindex special-display-buffer-names | |
738 You can make certain chosen buffers, which Emacs normally displays | |
739 in ``another window,'' appear in special frames of their own. To do | |
740 this, set the variable @code{special-display-buffer-names} to a list | |
741 of buffer names; any buffer whose name is in that list automatically | |
742 gets a special frame, when an Emacs command wants to display it ``in | |
743 another window.'' | |
744 | |
745 For example, if you set the variable this way, | |
746 | |
747 @example | |
748 (setq special-display-buffer-names | |
749 '("*Completions*" "*grep*" "*tex-shell*")) | |
750 @end example | |
751 | |
752 @noindent | |
753 then completion lists, @code{grep} output and the @TeX{} mode shell | |
754 buffer get individual frames of their own. These frames, and the | |
755 windows in them, are never automatically split or reused for any other | |
756 buffers. They continue to show the buffers they were created for, | |
757 unless you alter them by hand. Killing the special buffer deletes its | |
758 frame automatically. | |
759 | |
760 @vindex special-display-regexps | |
761 More generally, you can set @code{special-display-regexps} to a list | |
762 of regular expressions; then a buffer gets its own frame if its name | |
763 matches any of those regular expressions. (Once again, this applies only | |
764 to buffers that normally get displayed for you in ``another window.'') | |
765 | |
766 @vindex special-display-frame-alist | |
767 The variable @code{special-display-frame-alist} specifies the frame | |
768 parameters for these frames. It has a default value, so you don't need | |
769 to set it. | |
770 | |
771 For those who know Lisp, an element of | |
772 @code{special-display-buffer-names} or @code{special-display-regexps} | |
773 can also be a list. Then the first element is the buffer name or | |
774 regular expression; the rest of the list specifies how to create the | |
775 frame. It can be an association list specifying frame parameter | |
776 values; these values take precedence over parameter values specified | |
777 in @code{special-display-frame-alist}. If you specify the symbol | |
778 @code{same-window} as a ``frame parameter'' in this list, with a | |
779 non-@code{nil} value, that means to use the selected window if | |
780 possible. If you use the symbol @code{same-frame} as a ``frame | |
781 parameter'' in this list, with a non-@code{nil} value, that means to | |
782 use the selected frame if possible. | |
783 | |
784 Alternatively, the value can have this form: | |
785 | |
786 @example | |
787 (@var{function} @var{args}...) | |
788 @end example | |
789 | |
790 @noindent | |
791 where @var{function} is a symbol. Then the frame is constructed by | |
792 calling @var{function}; its first argument is the buffer, and its | |
793 remaining arguments are @var{args}. | |
794 | |
795 An analogous feature lets you specify buffers which should be | |
796 displayed in the selected window. @xref{Force Same Window}. The | |
797 same-window feature takes precedence over the special-frame feature; | |
798 therefore, if you add a buffer name to | |
799 @code{special-display-buffer-names} and it has no effect, check to see | |
800 whether that feature is also in use for the same buffer name. | |
801 | |
802 @node Frame Parameters | |
803 @section Setting Frame Parameters | |
804 @cindex Auto-Raise mode | |
805 @cindex Auto-Lower mode | |
806 | |
807 @kindex S-Mouse-1 | |
808 You can specify the font and colors used for text display, and the | |
809 colors for the frame borders, the cursor, and the mouse cursor, by | |
810 customizing the faces @code{default}, @code{border}, @code{cursor} and | |
811 @code{mouse}. @xref{Face Customization}. You can also set a frame's | |
812 default font through a pop-up menu. Press @kbd{S-Mouse-1} to activate | |
813 this menu. | |
814 | |
815 These commands are available for controlling the window management | |
816 behavior of the selected frame. | |
817 | |
818 @table @kbd | |
819 @findex auto-raise-mode | |
820 @item M-x auto-raise-mode | |
821 Toggle whether or not the selected frame should auto-raise. Auto-raise | |
822 means that every time you move the mouse onto the frame, it raises the | |
823 frame. | |
824 | |
825 Some window managers also implement auto-raise. If you enable | |
826 auto-raise for Emacs frames in your window manager, it will work, but | |
827 it is beyond Emacs' control, so @code{auto-raise-mode} has no effect | |
828 on it. | |
829 | |
830 @findex auto-lower-mode | |
831 @item M-x auto-lower-mode | |
832 Toggle whether or not the selected frame should auto-lower. | |
833 Auto-lower means that every time you move the mouse off the frame, | |
834 the frame moves to the bottom of the stack on the screen. | |
835 | |
836 The command @code{auto-lower-mode} has no effect on auto-lower | |
837 implemented by the window manager. To control that, you must use the | |
838 appropriate window manager features. | |
839 @end table | |
840 | |
841 In Emacs versions that use an X toolkit, the color-setting and | |
842 font-setting functions don't affect menus and the menu bar, since they | |
843 are displayed by their own widget classes. To change the appearance of | |
844 the menus and menu bar, you must use X resources (@pxref{Resources}). | |
845 @xref{Colors}, regarding colors. @xref{Font X}, regarding choice of | |
846 font. | |
847 | |
848 Colors, fonts, and other attributes of the frame's display can also | |
849 be customized by setting frame parameters in the variable | |
850 @code{default-frame-alist} (@pxref{Creating Frames}). For a detailed | |
851 description of frame parameters and customization, see @ref{Frame | |
852 Parameters,,, elisp, The Emacs Lisp Reference Manual}. | |
853 | |
854 @node Scroll Bars | |
855 @section Scroll Bars | |
856 @cindex Scroll Bar mode | |
857 @cindex mode, Scroll Bar | |
858 | |
859 On graphical displays, Emacs normally makes a @dfn{scroll bar} at | |
860 the left of each Emacs window.@footnote{Placing it at the left is | |
861 usually more useful with overlapping frames with text starting at the | |
862 left margin.} The scroll bar runs the height of the window, and shows | |
863 a moving rectangular inner box which represents the portion of the | |
864 buffer currently displayed. The entire height of the scroll bar | |
865 represents the entire length of the buffer. | |
866 | |
867 You can use @kbd{Mouse-2} (normally, the middle button) in the scroll | |
868 bar to move or drag the inner box up and down. If you move it to the | |
869 top of the scroll bar, you see the top of the buffer. If you move it to | |
870 the bottom of the scroll bar, you see the bottom of the buffer. | |
871 | |
872 The left and right buttons in the scroll bar scroll by controlled | |
873 increments. @kbd{Mouse-1} (normally, the left button) moves the line at | |
874 the level where you click up to the top of the window. @kbd{Mouse-3} | |
875 (normally, the right button) moves the line at the top of the window | |
876 down to the level where you click. By clicking repeatedly in the same | |
877 place, you can scroll by the same distance over and over. | |
878 | |
879 You can also click @kbd{C-Mouse-2} in the scroll bar to split a | |
880 window vertically. The split occurs on the line where you click. | |
881 | |
882 @findex scroll-bar-mode | |
883 @vindex scroll-bar-mode | |
884 You can enable or disable Scroll Bar mode with the command @kbd{M-x | |
885 scroll-bar-mode}. With no argument, it toggles the use of scroll | |
886 bars. With an argument, it turns use of scroll bars on if and only if | |
887 the argument is positive. This command applies to all frames, | |
888 including frames yet to be created. Customize the variable | |
889 @code{scroll-bar-mode} to control the use of scroll bars at startup. | |
890 You can use it to specify that they are placed at the right of windows | |
891 if you prefer that. You have to set this variable through the | |
892 @samp{Customize} interface (@pxref{Easy Customization}), or it will | |
893 not work properly. | |
894 | |
895 You can also use the X resource @samp{verticalScrollBars} to control | |
896 the initial setting of Scroll Bar mode. @xref{Resources}. | |
897 | |
898 @findex toggle-scroll-bar | |
899 To enable or disable scroll bars for just the selected frame, use the | |
900 command @kbd{M-x toggle-scroll-bar}. | |
901 | |
902 @vindex scroll-bar-width | |
903 @cindex width of the scroll bar | |
904 You can control the scroll bar width by changing the value of the | |
905 @code{scroll-bar-width} frame parameter. | |
906 | |
907 @node Wheeled Mice | |
908 @section Scrolling With ``Wheeled'' Mice | |
909 | |
910 @cindex mouse wheel | |
911 @cindex wheel, mouse | |
912 @findex mouse-wheel-mode | |
913 @cindex Mouse Wheel minor mode | |
914 @cindex mode, Mouse Wheel | |
915 Some mice have a ``wheel'' instead of a third button. You can | |
916 usually click the wheel to act as either @kbd{Mouse-2} or | |
917 @kbd{Mouse-3}, depending on the setup. You can also use the wheel to | |
918 scroll windows instead of using the scroll bar or keyboard commands. | |
919 Mouse wheel support only works if the system generates appropriate | |
920 events; whenever possible, it is turned on by default. To toggle this | |
921 feature, use @kbd{M-x mouse-wheel-mode}. | |
922 | |
923 @vindex mouse-wheel-follow-mouse | |
924 @vindex mouse-wheel-scroll-amount | |
925 @vindex mouse-wheel-progressive-speed | |
926 The two variables @code{mouse-wheel-follow-mouse} and | |
927 @code{mouse-wheel-scroll-amount} determine where and by how much | |
928 buffers are scrolled. The variable | |
929 @code{mouse-wheel-progressive-speed} determines whether the scroll | |
930 speed is linked to how fast you move the wheel. | |
931 | |
932 @node Drag and Drop | |
933 @section Drag and Drop | |
934 @cindex drag and drop | |
935 | |
936 Emacs supports @dfn{drag and drop} using the mouse. For instance, | |
937 dropping text onto an Emacs frame inserts the text where it is dropped. | |
938 Dropping a file onto an Emacs frame visits that file. As a special | |
939 case, dropping the file on a Dired buffer moves or copies the file | |
940 (according to the conventions of the application it came from) into the | |
941 directory displayed in that buffer. | |
942 | |
943 @vindex dnd-open-file-other-window | |
944 Dropping a file normally visits it in the window you drop it on. If | |
945 you prefer to visit the file in a new window in such cases, customize | |
946 the variable @code{dnd-open-file-other-window}. | |
947 | |
948 The XDND and Motif drag and drop protocols, and the old KDE 1.x | |
949 protocol, are currently supported. | |
950 | |
951 @node Menu Bars | |
952 @section Menu Bars | |
953 @cindex Menu Bar mode | |
954 @cindex mode, Menu Bar | |
955 @findex menu-bar-mode | |
956 @vindex menu-bar-mode | |
957 | |
958 You can turn display of menu bars on or off with @kbd{M-x | |
959 menu-bar-mode} or by customizing the variable @code{menu-bar-mode}. | |
960 With no argument, this command toggles Menu Bar mode, a | |
961 minor mode. With an argument, the command turns Menu Bar mode on if the | |
962 argument is positive, off if the argument is not positive. You can use | |
963 the X resource @samp{menuBarLines} to control the initial setting of | |
964 Menu Bar mode. @xref{Resources}. | |
965 | |
966 @kindex C-Mouse-3 @r{(when menu bar is disabled)} | |
967 Expert users often turn off the menu bar, especially on text-only | |
968 terminals, where this makes one additional line available for text. | |
969 If the menu bar is off, you can still pop up a menu of its contents | |
970 with @kbd{C-Mouse-3} on a display which supports pop-up menus. | |
971 @xref{Menu Mouse Clicks}. | |
972 | |
973 @xref{Menu Bar}, for information on how to invoke commands with the | |
974 menu bar. @xref{X Resources}, for how to customize the menu bar | |
975 menus' visual appearance. | |
976 | |
977 @node Tool Bars | |
978 @section Tool Bars | |
979 @cindex Tool Bar mode | |
980 @cindex mode, Tool Bar | |
981 @cindex icons, toolbar | |
982 | |
983 The @dfn{tool bar} is a line (or lines) of icons at the top of the | |
984 Emacs window, just below the menu bar. You can click on these icons | |
985 with the mouse to do various jobs. | |
986 | |
987 The global tool bar contains general commands. Some major modes | |
988 define their own tool bars to replace it. A few ``special'' modes | |
989 that are not designed for ordinary editing remove some items from the | |
990 global tool bar. | |
991 | |
992 Tool bars work only on a graphical display. The tool bar uses colored | |
993 XPM icons if Emacs was built with XPM support. Otherwise, the tool | |
994 bar uses monochrome icons (PBM or XBM format). | |
995 | |
996 @findex tool-bar-mode | |
997 @vindex tool-bar-mode | |
998 You can turn display of tool bars on or off with @kbd{M-x | |
999 tool-bar-mode} or by customizing the option @code{tool-bar-mode}. | |
1000 | |
1001 @node Dialog Boxes | |
1002 @section Using Dialog Boxes | |
1003 @cindex dialog boxes | |
1004 | |
1005 @vindex use-dialog-box | |
1006 A dialog box is a special kind of menu for asking you a yes-or-no | |
1007 question or some other special question. Many Emacs commands use a | |
1008 dialog box to ask a yes-or-no question, if you used the mouse to | |
1009 invoke the command to begin with. | |
1010 | |
1011 You can customize the variable @code{use-dialog-box} to suppress the | |
1012 use of dialog boxes. This also controls whether to use file selection | |
1013 windows (but those are not supported on all platforms). | |
1014 | |
1015 @vindex use-file-dialog | |
1016 A file selection window is a special kind of dialog box for asking | |
1017 for file names. You can customize the variable @code{use-file-dialog} | |
1018 to suppress the use of file selection windows, even if you still want | |
1019 other kinds of dialogs. This variable has no effect if you have | |
1020 suppressed all dialog boxes with the variable @code{use-dialog-box}. | |
1021 | |
1022 @vindex x-gtk-show-hidden-files | |
1023 For Gtk+ version 2.4 and newer, Emacs use the Gtk+ file chooser | |
1024 dialog. Emacs adds a toggle button that enables and disables showing | |
1025 of hidden files (files starting with a dot) in that dialog. The | |
1026 variable @code{x-gtk-show-hidden-files} controls whether to show | |
1027 hidden files by default. | |
1028 | |
1029 @vindex x-gtk-use-old-file-dialog | |
1030 For Gtk+ versions 2.4 through 2.10, you can select the old file | |
1031 dialog (@code{gtk-file-selector}) by setting the variable | |
1032 @code{x-gtk-use-old-file-dialog} to a non-@code{nil} value. If it is | |
1033 @code{nil}, Emacs uses @code{gtk-file-chooser}. If Emacs is built | |
1034 with a Gtk+ version that has only one file dialog, this variable has | |
1035 no effect. | |
1036 | |
1037 @vindex x-gtk-file-dialog-help-text | |
1038 Emacs adds help text to the Gtk+ file chooser dialog. The variable | |
1039 @code{x-gtk-file-dialog-help-text} specifies the text to add; if it is | |
1040 @code{nil}, that disables the added text. | |
1041 | |
1042 @node Tooltips | |
1043 @section Tooltips | |
1044 @cindex tooltips | |
1045 | |
1046 @dfn{Tooltips} are small windows that display text information at the | |
1047 current mouse position. They activate when there is a pause in mouse | |
1048 movement. There are two types of tooltip: help tooltips and GUD | |
1049 tooltips. | |
1050 | |
1051 @dfn{Help tooltips} typically display over text---including the mode | |
1052 line---but are also available for other parts of the Emacs frame, such | |
1053 as the tool bar and menu items. | |
1054 | |
1055 @findex tooltip-mode | |
1056 You can toggle display of help tooltips (Tooltip mode) with the | |
1057 command @kbd{M-x tooltip-mode}. When Tooltip mode is disabled, the | |
1058 help text is displayed in the echo area instead. | |
1059 | |
1060 @dfn{GUD tooltips} show values of variables. They are useful when | |
1061 you are debugging a program. @xref{Debugger Operation}. | |
1062 | |
1063 @vindex tooltip-delay | |
1064 The variables @code{tooltip-delay} specifies how long Emacs should | |
1065 wait before displaying a tooltip. For additional customization | |
1066 options for displaying tooltips, use @kbd{M-x customize-group | |
1067 @key{RET} tooltip @key{RET}}. @xref{X Resources}, for information on | |
1068 customizing the windows that display tooltips. | |
1069 | |
1070 @node Mouse Avoidance | |
1071 @section Mouse Avoidance | |
1072 @cindex avoiding mouse in the way of your typing | |
1073 @cindex mouse avoidance | |
1074 | |
1075 @vindex mouse-avoidance-mode | |
1076 Mouse Avoidance mode keeps the mouse pointer away from point, to avoid | |
1077 obscuring text you want to edit. Whenever it moves the mouse, it also | |
1078 raises the frame. To use Mouse Avoidance mode, customize the variable | |
1079 @code{mouse-avoidance-mode}. You can set this to various values to | |
1080 move the mouse in several ways: | |
1081 | |
1082 @table @code | |
1083 @item banish | |
1084 Move the mouse to the upper-right corner on any key-press; | |
1085 @item exile | |
1086 Move the mouse to the corner only if the cursor gets too close, | |
1087 and allow it to return once the cursor is out of the way; | |
1088 @item jump | |
1089 If the cursor gets too close to the mouse, displace the mouse | |
1090 a random distance & direction; | |
1091 @item animate | |
1092 As @code{jump}, but shows steps along the way for illusion of motion; | |
1093 @item cat-and-mouse | |
1094 The same as @code{animate}; | |
1095 @item proteus | |
1096 As @code{animate}, but changes the shape of the mouse pointer too. | |
1097 @end table | |
1098 | |
1099 @findex mouse-avoidance-mode | |
1100 You can also use the command @kbd{M-x mouse-avoidance-mode} to enable | |
1101 the mode. | |
1102 | |
1103 @node Non-Window Terminals | |
1104 @section Non-Window Terminals | |
1105 @cindex non-window terminals | |
1106 @cindex single-frame terminals | |
1107 | |
1108 On a text-only terminal, Emacs can display only one Emacs frame at a | |
1109 time. However, you can still create multiple Emacs frames, and switch | |
1110 between them. Switching frames on these terminals is much like | |
1111 switching between different window configurations. | |
1112 | |
1113 Use @kbd{C-x 5 2} to create a new frame and switch to it; use @kbd{C-x | |
1114 5 o} to cycle through the existing frames; use @kbd{C-x 5 0} to delete | |
1115 the current frame. | |
1116 | |
1117 Each frame has a number to distinguish it. If your terminal can | |
1118 display only one frame at a time, the selected frame's number @var{n} | |
1119 appears near the beginning of the mode line, in the form | |
1120 @samp{F@var{n}}. | |
1121 | |
1122 @findex set-frame-name | |
1123 @findex select-frame-by-name | |
1124 @samp{F@var{n}} is in fact the frame's initial name. You can give | |
1125 frames more meaningful names if you wish, and you can select a frame | |
1126 by its name. Use the command @kbd{M-x set-frame-name @key{RET} | |
1127 @var{name} @key{RET}} to specify a new name for the selected frame, | |
1128 and use @kbd{M-x select-frame-by-name @key{RET} @var{name} @key{RET}} | |
1129 to select a frame according to its name. The name you specify appears | |
1130 in the mode line when the frame is selected. | |
1131 | |
1132 @node Text-Only Mouse | |
1133 @section Using a Mouse in Terminal Emulators | |
1134 @cindex mouse support | |
1135 @cindex terminal emulators, mouse support | |
1136 | |
1137 Some terminal emulators support mouse clicks in the terminal window. | |
1138 | |
1139 @cindex xterm | |
1140 In a terminal emulator which is compatible with @code{xterm}, | |
1141 you can use @kbd{M-x xterm-mouse-mode} to give Emacs control over | |
1142 simple use of the mouse---basically, only non-modified single clicks | |
1143 are supported. The normal @code{xterm} mouse functionality for such | |
1144 clicks is still available by holding down the @kbd{SHIFT} key when you | |
1145 press the mouse button. Xterm Mouse mode is a global minor mode | |
1146 (@pxref{Minor Modes}). Repeating the command turns the mode off | |
1147 again. | |
1148 | |
1149 In the console on GNU/Linux, you can use @kbd{M-x t-mouse-mode}. You | |
1150 need to have the gpm package installed and running on your system in | |
1151 order for this to work. | |
1152 | |
1153 @ignore | |
1154 arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49 | |
1155 @end ignore |