C-h i
)
for the full story.
C-x
means CONTROL-x
, while
M-x
means META-x
; you have to press both keys
(i.e., either CONTROL
or META
) and x
simultaneously.
CONTROL
or META
key pressed
- this has no effect, it is only "prefixing" the keyboard entry -
and then press the x
.]
META
key is sometimes labelled ALT
. If
you do not have it, press ESCAPE
instead, followed
by, say, x
.
C-x 5 2
).
USEFUL FEATURE: in the echo area, when it makes sense (e.g.,
command names, file names), hitting SPACE or TAB will complete what you
typed, or give you a list of possible completions (SPACE will complete at
most one word first).
Notice the message in the buffer that contains the possible
completions: you can pick your selection from there! Normally
mouse-2
is the middle mouse button, mouse-1
the
left one, etc.
SUMMARY: one can perform an Emacs command in one of the following ways:
M-x
and the full command name.
For starters, there are quite a few Emacs commands listed in the menus at
the top of an Emacs frame.
Often you are also given the key-combination corresponding to that command.
For example, under the menu "Files", you can find the command "Open File..." The dots suggest that you will have to do more when the command starts. Indeed, you have to give the name of the file - in the echo area - then press RETURN.
But you also see that you can run the same command by typing C-x
C-f
.
Actually, this key-combination is bound to the Emacs command
find-file
, which is a piece of Lisp code designed to do what
you expect in this situation.
Some Emacs commands are bound to short key sequences. There are many more commands than "simple" key-combinations. But you can invoke a command by using its full name.
To invoke a command by its full name, type M-x
, then the name
of the command, and finally hit RETURN (notice that all this happens in the
echo area).
You can hit RETURN even before entering the whole command name,
provided there is only one "immediate" completion.
Example:
M-x find-f RETURN
will list the choices,
M-x find-fi RETURN
will execute find-file
,
M-x find-file-other-f RETURN
to
execute find-file-other-frame
.
First, here are a few commands that make Emacs more convenient:
auto-fill-mode
(toggle)
font-lock-mode
(toggle)
transient-mark-mode
(toggle)
auto-compression-mode
(toggle)
Now a few editing commands:
undo
, bound to C-_
 , C-/
, and
Undo in the Edit menu.
kill-region
, bound to C-w
,
cut
, and Cut in the Edit menu.
yank
can retrieve it from there.
kill-ring-save
, bound to M-w
,
copy
, and Copy in the Edit menu
yank
, bound to C-y
, and Paste in
the Edit menu
yank-pop
, bound to M-y
set-mark-command
, bound to C-SPACE
, C-@
,
stop
, insert
Emacs can do much more than editing. Notice that the menus on top will now
include items specific to the new usage. But, we can still use the same
editing commands, copy and paste between buffers, etc.!
Here are some of these commands:
shell
ediff-files
, ediff-directories
, etc.
M-x ediff TAB
to see what else is available.
compose-mail
, bound to C-x m
, and Send
Mail in the Tools menu.
calendar
bound to Display Calendar in the
Tools menu.
doctor