try using a command. For instance:
<<Blank lines inserted around following line by help-with-tutorial>>
[Middle of page left blank for didactic purposes. Text continues below]
->> Now type C-v (View next screen) to move to the next screen.
+>> Now type C-v (View next screen) to move to the next screen.
(go ahead, do it by holding down the CONTROL key while typing v).
From now on, you should do this again whenever you finish
reading the screen.
with C-v. To move backwards one screen, type M-v (hold down the META key
and type v, or type <ESC>v if you do not have a META, EDIT, or ALT key).
->> Try typing M-v and then C-v, a few times.
+>> Try typing M-v and then C-v, a few times.
* SUMMARY
something different.
C-v and M-v are another kind of exception. When given an argument,
-they scroll the screen up or down by that many lines, rather than by a
-screenful. For example, C-u 8 C-v scrolls the screen by 8 lines.
+they scroll the text up or down by that many lines, rather than by a
+screenful. For example, C-u 8 C-v scrolls by 8 lines.
>> Try typing C-u 8 C-v now.
-This should have scrolled the screen up by 8 lines. If you would like
+This should have scrolled the text up by 8 lines. If you would like
to scroll it down again, you can give an argument to M-v.
If you are using a graphical display, such as X or MS-Windows, there
>> Type C-x 1 and see the documentation listing window disappear.
-This command is unlike the other commands you have learned in that it
-consists of two characters. It starts with the character CONTROL-x.
There is a whole series of commands that start with CONTROL-x; many of
them have to do with windows, files, buffers, and related things.
These commands are two, three or four characters long.
graphical display, little curved arrows appear in the narrow spaces on
each side of the text area (the left and right "fringes"), to indicate
where a line has been continued. If you're using a text terminal, the
-continued line is indicated by a backslash ("\") on the rightmost
+continued line is indicated by a backslash ('\') on the rightmost
screen column.
>> Insert text until you reach the right margin, and keep on inserting.
>> Type <Return> to reinsert the Newline you deleted.
+The <Return> key is special, in that pressing it may do more than
+just insert a Newline character. Depending on the surrounding text,
+it may insert whitespace after the Newline character, so that when
+you start typing on the newly created line, the text lines up with
+that on the previous line. We call this behavior (where pressing a
+key does more than simply inserting the relevant character) "electric".
+
+>> Here is an example of <Return> being electric.
+ Type <Return> at the end of this line.
+
+You should see that after inserting the Newline, Emacs inserts spaces
+so that the cursor moves under the "T" of "Type".
+
Remember that most Emacs commands can be given a repeat count;
this includes text characters. Repeating a text character inserts
it several times.
->> Try that now -- type C-u 8 * to insert ********.
+>> Try that now -- type C-u 8 * to insert ********.
You've now learned the most basic way of typing something in
Emacs and correcting errors. You can delete by words or lines
The difference between "killing" and "deleting" is that "killed" text
can be reinserted (at any position), whereas "deleted" things cannot
-be reinserted in this way (you can, however, undo a deletion--see below).
-Reinsertion of killed text is called "yanking". Generally, the
-commands that can remove a lot of text kill the text (they are set up so
-that you can yank the text), while the commands that remove just one
-character, or only remove blank lines and spaces, do deletion (so you
-cannot yank that text). <DEL> and C-d do deletion in the simplest
-case, with no argument. When given an argument, they kill instead.
+be reinserted in this way (you can, however, undo a deletion--see
+below). Reinsertion of killed text is called "yanking". (Think of it
+as yanking back, or pulling back, some text that was taken away.)
+Generally, the commands that can remove a lot of text kill the text
+(they are set up so that you can yank the text), while the commands
+that remove just one character, or only remove blank lines and spaces,
+do deletion (so you cannot yank that text). <DEL> and C-d do deletion
+in the simplest case, with no argument. When given an argument, they
+kill instead.
>> Move the cursor to the beginning of a line which is not empty.
Then type C-k to kill the text on that line.
C-k kills the line itself, and makes all the other lines move up. C-k
treats a numeric argument specially: it kills that many lines AND
their contents. This is not mere repetition. C-u 2 C-k kills two
-lines and their newlines; typing C-k twice would not do that.
+lines and their Newlines; typing C-k twice would not do that.
-Reinserting killed text is called "yanking". (Think of it as yanking
-back, or pulling back, some text that was taken away.) You can yank
-the killed text either at the same place where it was killed, or at
-some other place in the text you are editing, or even in a different
-file. You can yank the same text several times; that makes multiple
-copies of it. Some other editors call killing and yanking "cutting"
-and "pasting" (see the Glossary in the Emacs manual).
+You can yank the killed text either at the same place where it was
+killed, or at some other place in the text you are editing, or even in
+a different file. You can yank the same text several times; that
+makes multiple copies of it. Some other editors call killing and
+yanking "cutting" and "pasting" (see the Glossary in the Emacs
+manual).
The command for yanking is C-y. It reinserts the last killed text,
at the current cursor position.
This copies the text within Emacs into the file. The first time you
do this, Emacs renames the original file to a new name so that it is
not lost. The new name is made by adding "~" to the end of the
-original file's name.
-
-When saving is finished, Emacs displays the name of the file written.
-You should save fairly often, so that you will not lose very much
-work if the system should crash (see the section "Auto Save" below).
+original file's name. When saving is finished, Emacs displays the
+name of the file written.
>> Type C-x C-s TUTORIAL <Return>.
This should save this tutorial to a file named TUTORIAL, and show
You can find an existing file, to view it or edit it. You can also
find a file which does not already exist. This is the way to create a
-file with Emacs: find the file, which will start out empty, and then
-begin inserting the text for the file. When you ask to "save" the
-file, Emacs will really create the file with the text that you have
-inserted. From then on, you can consider yourself to be editing an
-already existing file.
+file with Emacs: find the file, which starts out empty, and then begin
+inserting the text for the file. When you ask to "save" the file,
+Emacs actually creates the file with the text that you have inserted.
+From then on, you can consider yourself to be editing an already
+existing file.
* BUFFERS
The buffer list you make with C-x C-b shows you both the buffer name
and the file name of every buffer.
-ANY text you see in an Emacs window is always part of some buffer.
Some buffers do not correspond to files. The buffer named
"*Buffer List*", which contains the buffer list that you made with
C-x C-b, does not have any file. This TUTORIAL buffer initially did
in that file's buffer. The creation or editing of the second file's
buffer has no effect on the first file's buffer. This is very useful,
but it also means that you need a convenient way to save the first
-file's buffer. It would be a nuisance to have to switch back to
-it with C-x C-f in order to save it with C-x C-s. So we have
+file's buffer. Having to switch back to that buffer, in order to save
+it with C-x C-s, would be a nuisance. So we have
C-x s Save some buffers
command to move from Emacs to another application. You can do this
with the mouse or with window manager commands. However, if you're
using a text terminal which can only show one application at a time,
-you need to "suspend" Emacs to move to any other program.
+you need to "suspend" Emacs to move to any other application.
C-z is the command to exit Emacs *temporarily*--so that you can go
back to the same Emacs session afterward. When Emacs is running on a
text terminal, C-z "suspends" Emacs; that is, it returns to the shell
but does not destroy the Emacs job. In the most common shells, you
-can resume Emacs with the `fg' command or with `%emacs'.
+can resume Emacs with the "fg" command or with "%emacs".
The time to use C-x C-c is when you are about to log out. It's also
-the right thing to use to exit an Emacs invoked under mail handling
-programs and other miscellaneous utilities.
+the right thing to use to exit an Emacs invoked for a quick edit, such
+as by a mail handling utility.
There are many C-x commands. Here is a list of the ones you have learned:
Named eXtended commands are commands which are used even less
frequently, or commands which are used only in certain modes. An
-example is the command replace-string, which globally replaces one
-string with another. When you type M-x, Emacs prompts you at the
+example is the command replace-string, which replaces one string with
+another in the buffer. When you type M-x, Emacs prompts you at the
bottom of the screen with M-x and you should type the name of the
command; in this case, "replace-string". Just type "repl s<TAB>" and
Emacs will complete the name. (<TAB> is the Tab key, usually found
>> Move the cursor to the blank line two lines below this one.
Then type M-x repl s<Return>changed<Return>altered<Return>.
- Notice how this line has changed: you've replaced
- the word c-h-a-n-g-e-d with "altered" wherever it occurred,
- after the initial position of the cursor.
+ Notice how this line has changed: you've replaced the word
+ "changed" with "altered" wherever it occurred, after the
+ initial position of the cursor.
* AUTO SAVE
To view documentation on your current major mode, type C-h m.
+>> Move the cursor to the line following this line.
>> Type C-l C-l to bring this line to the top of screen.
>> Type C-h m, to see how Text mode differs from Fundamental mode.
>> Type C-x 1 to remove the documentation from the screen.
you want to search for. <Return> terminates a search.
>> Now type C-s to start a search. SLOWLY, one letter at a time,
- type the word 'cursor', pausing after you type each
+ type the word "cursor", pausing after you type each
character to notice what happens to the cursor.
Now you have searched for "cursor", once.
>> Type C-s again, to search for the next occurrence of "cursor".
Did you see what happened? Emacs, in an incremental search, tries to
go to the occurrence of the string that you've typed out so far. To
-go to the next occurrence of 'cursor' just type C-s again. If no such
+go to the next occurrence of "cursor" just type C-s again. If no such
occurrence exists, Emacs beeps and tells you the search is currently
"failing". C-g would also terminate the search.
The command C-M-v is very useful when you are editing text in one
window and using the other window just for reference. Without leaving
-the selected window, you can scroll the other window with C-M-v.
+the selected window, you can scroll the text in the other window with
+C-M-v.
C-M-v is an example of a CONTROL-META character. If you have a META
(or Alt) key, you can type C-M-v by holding down both CONTROL and META
>> Type C-h a file <Return>.
This displays in another window a list of all M-x commands with "file"
-in their names. You will see character-commands like C-x C-f listed
-beside the corresponding command names such as find-file.
+in their names. You will see character-commands listed beside the
+corresponding command names (such as C-x C-f beside find-file).
>> Type C-M-v to scroll the help window. Do this a few times.
>> Type C-x 1 to delete the help window.
C-h i Read included Manuals (a.k.a. Info). This command puts
- you into a special buffer called `*info*' where you
+ you into a special buffer called "*info*" where you
can read manuals for the packages installed on your system.
Type m emacs <Return> to read the Emacs manual.
If you have never before used Info, type ? and Emacs
This version of the tutorial is a part of GNU Emacs. It is copyrighted
and comes with permission to distribute copies on certain conditions:
- Copyright (C) 1985, 1996, 1998, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1996, 1998, 2001-2015 Free Software Foundation,
+ Inc.
This file is part of GNU Emacs.
Please read the file COPYING and then do give copies of GNU Emacs to
your friends. Help stamp out software obstructionism ("ownership") by
using, writing, and sharing free software!
-