annotate man/xemacs/windows.texi @ 2626:2d9d73aaa3fc

[xemacs-hg @ 2005-03-01 22:51:30 by viteno] Update xemacs_extra_name.
author viteno
date Tue, 01 Mar 2005 22:51:30 +0000
parents 576fb035e263
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @node Windows, Mule, Buffers, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @chapter Multiple Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @cindex windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 Emacs can split the frame into two or many windows, which can display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 parts of different buffers or different parts of one buffer. If you are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 running XEmacs under X, that means you can have the X window that contains
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
9 the Emacs frame have multiple subwindows.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 * Basic Window:: Introduction to Emacs windows.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 * Split Window:: New windows are made by splitting existing windows.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 * Other Window:: Moving to another window or doing something to it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 * Pop Up Window:: Finding a file or buffer in another window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 * Change Window:: Deleting windows and changing their sizes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 @node Basic Window, Split Window, Windows, Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 @section Concepts of Emacs Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 When Emacs displays multiple windows, each window has one Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 buffer designated for display. The same buffer may appear in more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 than one window; if it does, any changes in its text are displayed in all
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 the windows that display it. Windows showing the same buffer can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 show different parts of it, because each window has its own value of point.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 @cindex selected window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 At any time, one window is the @dfn{selected window}; the buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 displayed by that window is the current buffer. The cursor
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 shows the location of point in that window. Each other window has a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 location of point as well, but since the terminal has only one cursor, it
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
33 cannot show the location of point in the other windows.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 Commands to move point affect the value of point for the selected Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 window only. They do not change the value of point in any other Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 window, including those showing the same buffer. The same is true for commands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 such as @kbd{C-x b} to change the selected buffer in the selected window;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 they do not affect other windows at all. However, there are other commands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 such as @kbd{C-x 4 b} that select a different window and switch buffers in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 it. Also, all commands that display information in a window, including
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 (for example) @kbd{C-h f} (@code{describe-function}) and @kbd{C-x C-b}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 (@code{list-buffers}), work by switching buffers in a non-selected window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 without affecting the selected window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 Each window has its own mode line, which displays the buffer name,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 modification status, and major and minor modes of the buffer that is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 displayed in the window. @xref{Mode Line}, for details on the mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 line.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 @node Split Window, Other Window, Basic Window, Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 @section Splitting Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 @item C-x 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 Split the selected window into two windows, one above the other
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 (@code{split-window-vertically}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 @item C-x 3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 Split the selected window into two windows positioned side by side
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 (@code{split-window-horizontally}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 @item C-x 6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 Save the current window configuration in register @var{reg} (a letter).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 @item C-x 7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 Restore (make current) the window configuration in register
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 @var{reg} (a letter). Use with a register previously set with @kbd{C-x 6}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 @kindex C-x 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 @findex split-window-vertically
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 The command @kbd{C-x 2} (@code{split-window-vertically}) breaks the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 selected window into two windows, one above the other. Both windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 start out displaying the same buffer, with the same value of point. By
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 default each of the two windows gets half the height of the window that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 was split. A numeric argument specifies how many lines to give to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 top window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 @kindex C-x 3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 @findex split-window-horizontally
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 @kbd{C-x 3} (@code{split-window-horizontally}) breaks the selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 window into two side-by-side windows. A numeric argument specifies how
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 many columns to give the one on the left. A line of vertical bars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 separates the two windows. Windows that are not the full width of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 frame have truncated mode lines which do not always appear in inverse
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 video, because Emacs display routines cannot display a region of inverse
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 video that is only part of a line on the screen.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 @vindex truncate-partial-width-windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 When a window is less than the full width, many text lines are too
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 long to fit. Continuing all those lines might be confusing. Set the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 variable @code{truncate-partial-width-windows} to non-@code{nil} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 force truncation in all windows less than the full width of the frame,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 independent of the buffer and its value for @code{truncate-lines}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 @xref{Continuation Lines}.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 Horizontal scrolling is often used in side-by-side windows.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 @xref{Display}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 @findex jump-to-register
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 @findex window-configuration-to-register
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 You can resize a window and store that configuration in a register by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 supplying a @var{register} argument to @code{window-configuration-to-register}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (@kbd{C-x 6}). To return to the window configuration established with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 @code{window-configuration-to-register}, use @code{jump-to-register}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 (@kbd{C-x j}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 @node Other Window, Pop Up Window, Split Window, Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 @section Using Other Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 @item C-x o
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 Select another window (@code{other-window}). That is the letter `o', not zero.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 @item M-C-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 Scroll the next window (@code{scroll-other-window}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 @item M-x compare-windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 Find the next place where the text in the selected window does not match
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 the text in the next window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 @item M-x other-window-any-frame @var{n}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 Select the @var{n}th different window on any frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 @kindex C-x o
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 @findex other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 To select a different window, use @kbd{C-x o} (@code{other-window}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 That is an `o', for `other', not a zero. When there are more than
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 two windows, the command moves through all the windows in a cyclic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 order, generally top to bottom and left to right. From the rightmost
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 and bottommost window, it goes back to the one at the upper left corner.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 A numeric argument, @var{n}, moves several steps in the cyclic order of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 windows. A negative numeric argument moves around the cycle in the
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
130 opposite order. If the optional second argument @var{which-frames} is
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 non-@code{nil}, the function cycles through all frames. When the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 minibuffer is active, the minibuffer is the last window in the cycle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 you can switch from the minibuffer window to one of the other windows,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 and later switch back and finish supplying the minibuffer argument that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 is requested. @xref{Minibuffer Edit}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 @findex other-window-any-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 The command @kbd{M-x other-window-any-frame} also selects the window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 @var{n} steps away in the cyclic order. However, unlike @code{other-window},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 this command selects a window on the next or previous frame instead of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 wrapping around to the top or bottom of the current frame, when there
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 are no more windows.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 @kindex C-M-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 @findex scroll-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 The usual scrolling commands (@pxref{Display}) apply to the selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 window only. @kbd{M-C-v} (@code{scroll-other-window}) scrolls the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 window that @kbd{C-x o} would select. Like @kbd{C-v}, it takes positive
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
149 and negative arguments.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 @findex compare-windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 The command @kbd{M-x compare-windows} compares the text in the current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 window with the text in the next window. Comparison starts at point in each
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 window. Point moves forward in each window, a character at a time,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 until the next set of characters in the two windows are different. Then the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 command is finished.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 A prefix argument @var{ignore-whitespace} means ignore changes in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 whitespace. The variable @code{compare-windows-whitespace} controls how
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 whitespace is skipped.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 If @code{compare-ignore-case} is non-@code{nil}, changes in case are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 also ignored.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 @node Pop Up Window, Change Window, Other Window, Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 @section Displaying in Another Window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 @kindex C-x 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 @kbd{C-x 4} is a prefix key for commands that select another window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 (splitting the window if there is only one) and select a buffer in that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 window. Different @kbd{C-x 4} commands have different ways of finding the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 buffer to select.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 @findex switch-to-buffer-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 @findex find-file-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 @findex find-tag-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 @findex dired-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 @findex mail-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 @item C-x 4 b @var{bufname} @key{RET}
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
181 Select buffer @var{bufname} in another window. This runs
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 @code{switch-to-buffer-other-window}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 @item C-x 4 f @var{filename} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 Visit file @var{filename} and select its buffer in another window. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 runs @code{find-file-other-window}. @xref{Visiting}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 @item C-x 4 d @var{directory} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 Select a Dired buffer for directory @var{directory} in another window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 This runs @code{dired-other-window}. @xref{Dired}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 @item C-x 4 m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 Start composing a mail message in another window. This runs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 @code{mail-other-window}, and its same-window version is @kbd{C-x m}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 (@pxref{Sending Mail}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 @item C-x 4 .
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 Find a tag in the current tag table in another window. This runs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 @code{find-tag-other-window}, the multiple-window variant of @kbd{M-.}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 (@pxref{Tags}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 @vindex display-buffer-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 If the variable @code{display-buffer-function} is non-@code{nil}, its value is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 the function to call to handle @code{display-buffer}. It receives two
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 arguments, the buffer and a flag that if non-@code{nil} means that the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 currently selected window is not acceptable. Commands such as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 @code{switch-to-buffer-other-window} and @code{find-file-other-window}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 work using this function.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 @node Change Window,, Pop Up Window, Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 @section Deleting and Rearranging Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 @item C-x 0
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
212 Get rid of the selected window (@code{delete-window}). That is a zero.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 If there is more than one Emacs frame, deleting the sole remaining
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 window on that frame deletes the frame as well. If the current frame
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 428
diff changeset
215 is the only frame, it is not deleted.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 @item C-x 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 Get rid of all windows except the selected one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 (@code{delete-other-windows}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 @item C-x ^
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 Make the selected window taller, at the expense of the other(s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 @*(@code{enlarge-window}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 @item C-x @}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 Make the selected window wider (@code{enlarge-window-horizontally}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 @kindex C-x 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 @findex delete-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 To delete a window, type @kbd{C-x 0} (@code{delete-window}). (That is a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 zero.) The space occupied by the deleted window is distributed among the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 other active windows (but not the minibuffer window, even if that is active
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 at the time). Once a window is deleted, its attributes are forgotten;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 there is no automatic way to make another window of the same shape or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 showing the same buffer. The buffer continues to exist, and you can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 select it in any window with @kbd{C-x b}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 @kindex C-x 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 @findex delete-other-windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 @kbd{C-x 1} (@code{delete-other-windows}) is more powerful than @kbd{C-x 0};
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 it deletes all the windows except the selected one (and the minibuffer).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 The selected window expands to use the whole frame except for the echo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 @kindex C-x ^
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 @findex enlarge-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 @kindex C-x @}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 @findex enlarge-window-horizontally
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 @vindex window-min-height
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 @vindex window-min-width
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 To readjust the division of space among existing windows, use @kbd{C-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 ^} (@code{enlarge-window}). It makes the currently selected window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 longer by one line or as many lines as a numeric argument specifies.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 With a negative argument, it makes the selected window smaller.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 @kbd{C-x @}} (@code{enlarge-window-horizontally}) makes the selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 window wider by the specified number of columns. The extra screen space
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 given to a window comes from one of its neighbors, if that is possible;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 otherwise, all the competing windows are shrunk in the same proportion.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 If this makes some windows too small, those windows are deleted and their
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 space is divided up. Minimum window size is specified by the variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 @code{window-min-height} and @code{window-min-width}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 You can also resize windows within a frame by clicking the left mouse
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 button on a modeline, and dragging.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 Clicking the right button on a mode line pops up a menu of common window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 manager operations. This menu contains the following options:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 @cindex Windows menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 @cindex Pull-down Menus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 @cindex menus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 @table @b
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 @item Delete Window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 Remove the window above this modeline from the frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 @item Delete Other Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 Delete all windows on the frame except for the one above this modeline.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 @item Split Window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 Split the window above the mode line in half, creating another window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 @item Split Window Horizontally
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 Split the window above the mode line in half horizontally, so that there
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 will be two windows side-by-side.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 @item Balance Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 Readjust the sizes of all windows on the frame until all windows have
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 roughly the same number of lines.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 @end table