73 |
@cindex newline |
@cindex newline |
74 |
To end a line and start typing a new one, type @key{RET}. This |
To end a line and start typing a new one, type @key{RET}. This |
75 |
inserts a newline character in the buffer. If point is in the middle of |
inserts a newline character in the buffer. If point is in the middle of |
76 |
a line, @key{RET} splits the line. Typing @key{DEL} when the cursor is |
a line, the effect is to split the line. Typing @key{DEL} when the cursor is |
77 |
at the beginning of a line deletes the preceding newline, thus joining |
at the beginning of a line deletes the preceding newline, thus joining |
78 |
the line with the preceding line. |
the line with the preceding line. |
79 |
|
|
219 |
@item M-> |
@item M-> |
220 |
Move to the end of the buffer (@code{end-of-buffer}). |
Move to the end of the buffer (@code{end-of-buffer}). |
221 |
@item C-v |
@item C-v |
222 |
Scroll the display one screen forward, and move point if necessary to put |
@itemx @key{PAGEDOWN} |
223 |
it on the screen (@code{scroll-up}). This doesn't always |
@itemx @key{PRIOR} |
224 |
move point, but it is commonly used to do so. |
Scroll the display one screen forward, and move point if necessary to |
225 |
If your keyboard has a @key{PAGEDOWN} key, it does the same thing. |
put it on the screen (@code{scroll-up}). This doesn't always move |
226 |
|
point, but it is commonly used to do so. If your keyboard has a |
227 |
|
@key{PAGEDOWN} or @key{PRIOR} key, it does the same thing. |
228 |
|
|
229 |
Scrolling commands are further described in @ref{Scrolling}. |
Scrolling commands are further described in @ref{Scrolling}. |
230 |
@item M-v |
@item M-v |
231 |
|
@itemx @key{PAGEUP} |
232 |
|
@itemx @key{NEXT} |
233 |
Scroll one screen backward, and move point if necessary to put it on |
Scroll one screen backward, and move point if necessary to put it on |
234 |
the screen (@code{scroll-down}). This doesn't always move point, but |
the screen (@code{scroll-down}). This doesn't always move point, but |
235 |
it is commonly used to do so. The @key{PAGEUP} key has the same |
it is commonly used to do so. If your keyboard has a @key{PAGEUP} or |
236 |
effect. |
@key{NEXT} key, it does the same thing. |
237 |
@item M-x goto-char |
@item M-x goto-char |
238 |
Read a number @var{n} and move point to buffer position @var{n}. |
Read a number @var{n} and move point to buffer position @var{n}. |
239 |
Position 1 is the beginning of the buffer. |
Position 1 is the beginning of the buffer. |
260 |
@xref{Variables}, for how to set variables such as @code{track-eol}. |
@xref{Variables}, for how to set variables such as @code{track-eol}. |
261 |
|
|
262 |
@vindex next-line-add-newlines |
@vindex next-line-add-newlines |
263 |
@kbd{C-n} normally gets an error when you use it on the last line of |
@kbd{C-n} normally stops at the end of the bufer when you use it on |
264 |
the buffer (just as @kbd{C-p} gets an error on the first line). But |
the last line of the buffer. But if you set the variable |
265 |
if you set the variable @code{next-line-add-newlines} to a |
@code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on |
266 |
non-@code{nil} value, @kbd{C-n} on the last line of a buffer creates |
the last line of a buffer creates an additional line at the end and |
267 |
an additional line at the end and moves down onto it. |
moves down onto it. |
268 |
|
|
269 |
@node Erasing |
@node Erasing |
270 |
@section Erasing Text |
@section Erasing Text |
323 |
@item C-x u |
@item C-x u |
324 |
Undo one batch of changes---usually, one command worth (@code{undo}). |
Undo one batch of changes---usually, one command worth (@code{undo}). |
325 |
@item C-_ |
@item C-_ |
326 |
|
@itemx C-/ |
327 |
The same. |
The same. |
328 |
@item C-u C-x u |
@item C-u C-x u |
329 |
Undo one batch of changes in the region. |
Undo one batch of changes in the region. |
331 |
|
|
332 |
@kindex C-x u |
@kindex C-x u |
333 |
@kindex C-_ |
@kindex C-_ |
334 |
|
@kindex C-/ |
335 |
@findex undo |
@findex undo |
336 |
The command @kbd{C-x u} or @kbd{C-_} is how you undo. The first time |
The command @kbd{C-x u} (or @kbd{C-_} or @kbd{C-/}) is how you undo. |
337 |
you give this command, it undoes the last change. Point moves back to |
The first time you give this command, it undoes the last change. |
338 |
where it was before the command that made the change. |
Point moves back to where it was before the command that made the |
339 |
|
change. |
340 |
|
|
341 |
Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and |
Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and |
342 |
earlier changes, back to the limit of the undo information available. |
earlier changes, back to the limit of the undo information available. |
352 |
@cindex selective undo |
@cindex selective undo |
353 |
@kindex C-u C-x u |
@kindex C-u C-x u |
354 |
Ordinary undo applies to all changes made in the current buffer. You |
Ordinary undo applies to all changes made in the current buffer. You |
355 |
can also perform @dfn{selective undo}, limited to the current region. |
can also perform @dfn{selective undo}, limited to the current region |
356 |
|
(@pxref{The Region}). |
357 |
To do this, specify the region you want, then run the @code{undo} |
To do this, specify the region you want, then run the @code{undo} |
358 |
command with a prefix argument (the value does not matter): @kbd{C-u C-x |
command with a prefix argument (the value does not matter): @kbd{C-u C-x |
359 |
u} or @kbd{C-u C-_}. This undoes the most recent change in the region. |
u} or @kbd{C-u C-_}. This undoes the most recent change in the region. |
360 |
To undo further changes in the same region, repeat the @code{undo} |
To undo further changes in the same region, repeat the @code{undo} |
361 |
command (no prefix argument is needed). In Transient Mark mode, any use |
command (no prefix argument is needed). In Transient Mark mode |
362 |
of @code{undo} when there is an active region performs selective undo; |
(@pxref{Transient Mark}), any use of @code{undo} when there is an |
363 |
you do not need a prefix argument. |
active region performs selective undo; you do not need a prefix |
364 |
|
argument. |
365 |
|
|
366 |
If you notice that a buffer has been modified accidentally, the |
If you notice that a buffer has been modified accidentally, the |
367 |
easiest way to recover is to type @kbd{C-_} repeatedly until the stars |
easiest way to recover is to type @kbd{C-_} repeatedly until the stars |
416 |
undo data, then it is probably a bug and you should report it. |
undo data, then it is probably a bug and you should report it. |
417 |
@xref{Bugs,, Reporting Bugs}. |
@xref{Bugs,, Reporting Bugs}. |
418 |
|
|
419 |
The reason the @code{undo} command has two keys, @kbd{C-x u} and |
The reason the @code{undo} command has three key bindings, @kbd{C-x |
420 |
@kbd{C-_}, set up to run it is that it is worthy of a single-character |
u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a |
421 |
key, but on some keyboards it is not obvious how to type @kbd{C-_}. |
single-character key, but @kbd{C-x u} is more straightforward for |
422 |
@kbd{C-x u} is an alternative you can type straightforwardly on any |
beginners to type. |
|
terminal. |
|
423 |
|
|
424 |
@node Basic Files |
@node Basic Files |
425 |
@section Files |
@section Files |
730 |
@kindex M-@t{-} |
@kindex M-@t{-} |
731 |
@findex digit-argument |
@findex digit-argument |
732 |
@findex negative-argument |
@findex negative-argument |
733 |
If your terminal keyboard has a @key{META} key, the easiest way to |
If your terminal keyboard has a @key{META} key (labeled @key{ALT} on |
734 |
specify a numeric argument is to type digits and/or a minus sign while |
PC keyboards), the easiest way to specify a numeric argument is to |
735 |
holding down the @key{META} key. For example, |
type digits and/or a minus sign while holding down the @key{META} key. |
736 |
|
For example, |
737 |
|
|
738 |
@example |
@example |
739 |
M-5 C-n |
M-5 C-n |
786 |
A few commands treat a plain @kbd{C-u} differently from an ordinary |
A few commands treat a plain @kbd{C-u} differently from an ordinary |
787 |
argument. A few others may treat an argument of just a minus sign |
argument. A few others may treat an argument of just a minus sign |
788 |
differently from an argument of @minus{}1. These unusual cases are |
differently from an argument of @minus{}1. These unusual cases are |
789 |
described when they come up; they are always for reasons of convenience |
described when they come up; they are always for reasons of |
790 |
of use of the individual command. |
convenience of use of the individual command, and they are documented |
791 |
|
in the command's documentation string. |
792 |
|
|
793 |
You can use a numeric argument to insert multiple copies of a |
You can use a numeric argument to insert multiple copies of a |
794 |
character. This is straightforward unless the character is a digit; for |
character. This is straightforward unless the character is a digit; for |