annotate man/new-users-guide/region.texi @ 76:c0c698873ce1 r20-0b33

Import from CVS: tag r20-0b33
author cvs
date Mon, 13 Aug 2007 09:05:10 +0200
parents 376386a54a3c
children c9fe270a4101
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 @comment node-name, next, previous, up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 @node Select and Move, Search and Replace, Other Customizations, Top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 @chapter Selecting and Moving Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 @cindex region
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 @cindex mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 Many Emacs commands operate on an arbitrary contiguous
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 part of the current buffer. You can select some part of the buffer and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 edit only that part of the buffer. This selected buffer is called a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 @dfn{region}. You can select text in two ways:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 @itemize @bullet
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 You use special keys to select text by defining a region between the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 cursor and @dfn{the mark} (which you set).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 If you are running XEmacs under X, you can also select text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 with the mouse.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 @end itemize
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 @comment node-name, next, previous, up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 @menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 * Selecting Text:: Select a region of text by setting the Mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 * Mouse:: Selecting Text with Mouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 * Region Operation:: Various ways to operate on a selected text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 * Moving Text:: Moving Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 * Accumulating text:: Accumulating Text from several buffers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 @end menu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 @node Selecting Text, Mouse, Select and Move, Select and Move
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 @section Setting the Mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 @kindex C-SPC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 @kindex C-x C-x
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 @kindex C-<
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 @kindex C->
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 @findex set-mark-command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 @findex mark-beginning-of-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 @findex mark-end-of-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 @findex exchange-point-and-mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 To define a region you need to set @dfn{the mark} at one end of it and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 move the cursor to the other end. Once you set the mark, it remains
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 there until you set it again to some other place. Each buffer has its
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 own @dfn{mark ring} (a place where Emacs remembers 16 previous
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 locations of the mark). To set @dfn{the mark}, you can use the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 following commands:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 @item C-@key{SPC}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 This command will set @dfn{the mark} at the position of your cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (@code{set-mark-command}). You can move your cursor around and @dfn{the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 mark} will stay there.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 @item C-x C-x
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 Interchange mark and point (@code{exchange-point-and-mark}). Since Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 will have only one cursor, after you move the cursor it will be unable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 to show you where you set the @dfn{the mark}. In order to see @dfn{the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 mark} you can type the command @kbd{C-x C-x} which will put your cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 on the position of your mark and your mark on the position of your
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 cursor. Use the command again to reset the positions of your cursor and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 @item C-<
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 This command will push the mark at the beginning of the buffer without
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 changing the position of your cursor.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 @item C->
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 This command will push the mark at the end of the buffer without
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 changing the position of your cursor.
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 @noindent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 You can also give arguments to @kbd{C-<} or @kbd{C->}. @xref{The Mark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 and the Region,,,,XEmacs User's Manual}, for more information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 @comment node-name, next, previous, up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 @node Mouse, Region Operation, Selecting Text, Select and Move
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 @section Selecting Text with Mouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 @cindex mouse selection
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 @cindex clipboard selection
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 @cindex primary selection
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 @cindex cursor shapes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 If you are using XEmacs under X, you can use the mouse to select
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 text. The selected text will always be highlighted, so just by looking
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 at the text you know what you have selected so far. To select a word
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 just double-click with the left-mouse-button on the word. To select a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 whole line triple-click anywhere on the line with the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 left-mouse-button. You can also use the @b{Copy} item from the @b{Edit}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 menu on the menu-bar to select text. This kind of selection is called
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 @b{Clipboard} selection, @xref{X Clipboard Selection,,,,XEmacs User's
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 Manual}, for more information. To select an arbitrary region, follow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 these steps:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 @enumerate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 Move the mouse cursor over the character at the beginning of the region of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 text you want to select.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 Press and hold the left mouse button.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 While holding the left mouse button down, drag the cursor to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 character at the end of the region of text you want to select.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 Release the left mouse button.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 @end enumerate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 The selected region of text is highlighted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 @xref{Selecting Text with the Mouse,,,,XEmacs User's Manual}, for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 more information regarding the Mouse and additional mouse operations.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 @comment node-name, next, previous, up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 @node Region Operation, Moving Text, Mouse, Select and Move
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 @section Operating on the Region
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 Once you have selected a region you can do a lot of things to the text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 in the region:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 @kindex C-w
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 @kindex C-x C-u
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 @kindex C-x C-l
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 @kindex C-SPC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 @kindex C-x TAB
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 @kindex C-M-\
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 @findex print-region
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 @itemize @bullet
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 Kill the text with @kbd{C-w}. For example if you want to kill a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 paragraph, position the cursor to the beginning of the paragraph and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 type @kbd{C-SPC}. Then go to the end of the paragraph and type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 @kbd{C-w}. The entire paragraph will be deleted. You can also select the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 text with a mouse and type @kbd{C-w} to kill the entire
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 region. @xref{Killing,,,,XEmacs User's Manual}, for more information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 Save the text in a buffer or a file (@pxref{Accumulating Text,,,,XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 Manual}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 You can convert the case of the text with @kbd{C-x C-l} or @kbd{C-x C-u}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 If you type @kbd{C-x C-u} the selected text will become all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 upper-case. If you type @kbd{C-x C-l} the selected text will become all
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 lower-case.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 Print hardcopy with @kbd{M-x print-region}. @xref{Hardcopy,,,,XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 Manual}, for more information. This command will print a hardcopy of only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 the selected text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 @item
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 Indent it with @kbd{C-x @key{TAB}} or @kbd{C-M-\}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 @xref{Indentation,,,,XEmacs User's Manual}, for more information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 @end itemize
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 @comment node-name, next, previous, up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 @node Moving Text, Accumulating text, Region Operation, Select and Move
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 @section Moving Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 @cindex yanking
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 @cindex pasting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 @findex yank
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 @cindex killing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 @cindex kill ring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 @cindex moving text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 @kindex C-y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 The most common way to move or copy text in Emacs is through
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 @dfn{killing} or @samp{cutting} it and then @dfn{yanking} or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 @samp{pasting} it. You can also use the @b{Cut} or @b{Copy} option from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 the @b{Edit} menu for killing and copying respectively. @xref{Edit menu}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 for reviewing the commands for killing text. All the killed text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 in Emacs is recorded in the @dfn{kill ring}. Since there is only one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 kill ring in Emacs, you can kill text in one buffer and yank it in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 another buffer. To @samp{paste} or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 @samp{yank} the killed text you can use the following commands:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 @item C-y
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 This command will yank or paste the last killed text (@code{yank}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 @item M-w
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 Save region as last killed text without actually killing it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (@code{copy-region-as-kill}). You can use this command to copy a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 selected region and then yank (or paste) it without actually removing it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 from the buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 @item C-M-w
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 Append next kill to last batch of killed text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (@code{append-next-kill}). This command will append whatever you killed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 last to what you kill now. Then later you will be able to yank the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 entire appended text from the @dfn{kill ring}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 @comment node-name, next, previous, up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 @node Accumulating text, , Moving Text, Select and Move
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 @section Accumulating Text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 @findex append-to-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 @findex prepend-to-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 @findex copy-to-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 @findex append-to-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 @cindex copying text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 @cindex accumulating text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 @cindex rectangle commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 @cindex registers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 @cindex temporary storage
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 The following commands can be used for accumulating text from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 different buffers into one place or for copying one region of text into
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 many buffers:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 @item M-x append-to-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 Append region to contents of specified buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 (@code{append-to-buffer}). After you type in this command and press
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 @key{RET}, Emacs will prompt you for a buffer name. You will see a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 message in the echo area:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 @example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 Append to buffer: (default <buffer name>)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 @end example
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 @noindent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 After you type in a buffer name, a copy of the region will be inserted
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 at the location of the cursor into that buffer. If there is no buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 with the name given by you, Emacs will create a new buffer with that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 name. By default the cursor's position in the <buffer name> is at the end.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 @item M-x prepend-to-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 Prepend region to contents of specified buffer. This command is similar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 to the above command except that the cursor in the buffer (by default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 is at the beginning rather than at the end.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 @item M-x copy-to-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 Copy region into specified buffer, deleting that buffer's old
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 contents. This command will also prompt you for a buffer name.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 @item M-x insert-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 Insert contents of specified buffer into current buffer at point. This
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 command will prompt you for a buffername which you want to be copied
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 into the current buffer at the location of the cursor.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 @item M-x append-to-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 This command will prompt you for a filename and append the region to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 the end of the contents of the specified file.
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 @noindent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 @xref{Accumulating Text,,,,XEmacs User's Manual}, for more
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 information regarding this topic.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 You can also use @dfn{rectangle commands} for operating on rectangular
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 areas of text. @xref{Rectangles,,,,XEmacs User's Manual}, for more
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 information regarding rectangle commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 Emacs also provides @dfn{registers} which serve as temporary storage for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 text or positions. Each register has a one character name and they can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 store @dfn{regions}, a @dfn{rectangle}, or a @dfn{mark} i.e. a cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 position. Whatever you store in register stays there until you store
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 something else in that register. To find out about commands which
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 manipulate registers @xref{Registers,,,,XEmacs User's Manual}.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257