annotate man/xemacs/windows.texi @ 2:ac2d302a0011 r19-15b2

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