annotate man/new-users-guide/region.texi @ 5904:ee27ca517e90

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