Professional Documents
Culture Documents
Emacs Manual Command Summary, Draft 2016-12-21
Emacs Manual Command Summary, Draft 2016-12-21
Emacs Manual Command Summary, Draft 2016-12-21
Johannes Choo
Chapter 1
Chapter 2
Chapter 3
Keys
{Note: TODO}
Chapter 4
Chapter 5
Entering Emacs
{Note: TODO}
Chapter 6
Exiting Emacs
2
Key
Command
Description
C-c C-x
save-bufferskill-terminal
C-z
suspend-emacs
M-x kill-emacs
RET
Kill emacs.
Chapter 7
Inserting Text
Key
Command
Description
graphic
character
self-insertcommand
RET
newline
C-j
electricnewline-andmaybe-indent
DEL
deletebackward-char
C-q char
quoted-insert
C-q nn
quoted-insert
C-x 8
prefix key
C-u C-x 8
prefix key
Key
Command
Description
C-x 8 RET
insert-char
C-u n C-x 8
RET
insert-char
7.2
Key
Command
Description
C-f
forward-char
RIGHT
right-char
C-b
backward-char
LEFT
left-char
C-n,
DOWN
next-line
C-p,
UP
previous-line
C-a,
Home
move-beginningof-line
C-e,
End
move-end
M-f
forward-word
M-RIGHT
right-word
As forward-word, but as
backward-word if the point is in
an rtl paragraph.
M-b
backward-word
M-LEFT
left-word
As backward-word, but as
forward-word if the point is in an
rtl paragraph.
M-<
beginning-ofbuffer
C-u n M-<
beginning-ofbuffer
Key
Command
Description
M->
end-of-buffer
M-r
move-to-windowline-top-bottom
M-r M-r
move-to-windowline-top-bottom
M-r M-r
M-r
move-to-windowline-top-bottom
C-v,
PageDown,
next
scroll-upcommand
M-v,
PageUp,
prior
scroll-downcommand
M-g c n RET
goto-char
M-g TAB n
RET
move-to-column
M-g g n RET,
M-g M-g n
RET
goto-line
C-u n M-g g,
C-u n M-g
M-g
goto-line
C-x C-n
set-goal-column
C-u C-x
C-n
set-goal-column
7.3
Erasing Text
Key
Command
Description
DEL,
BACKSPACE
deletebackward-char
Delete
delete-forwardchar
C-d
delete-char
C-k
kill-line
M-d
kill-word
M-DEL
backward-killword
7.4
Key
Command
Description
C-/,
C-_
undo
C-x u
advertised-undo
7.5
Files
Key
Command
Description
C-x C-f
find-file
C-x C-s
save-buffer
7.6
Undoing Changes
Basic Help
Key
Command
Description
C-h
prefix key
F1
prefix key
C-h k key
describe-key
7.7
Blank Lines
Key
Command
Description
C-o
open-line
C-x C-o
delete-blanklines
7.8
Continuation Lines
7.9
Key
Command
Description
M-x what-line
RET
M-x linenumber-mode
RET
M-x columnnumber-mode
RET
M-=
count-wordsregion
M-x countwords
RET
count-words
C-x =
what-cursorposition
Key
7.10
Description
M-x
hl-line-mode
RET
M-x sizeindication-mode
RET
Numeric Arguments
Key
Command
Description
M- n
digit-argument
M--
negativeargument
C-u
universalargument
C-u n
digit-argument
C-u -- n
negativeargument
7.11
Command
Repeating a Command
Key
Command
Description
C-x z
repeat
Chapter 8
Minibuffer
8.1
8.2
8.3
Use C-q C-j to insert a newline in the minibuffer, since RET submits the argument.
8.4
8.4.1
Completion
Completion Example
{Note: TODO}
8.4.2
Completion Commands
Command
Description
TAB
minibuffercomplete
SPC
minibuffercomplete-word
RET
minibuffercomplete-andexit
minibuffercompletion-help
mouse-1,
mouse-2
mouse-choosecompletion
M-v,
PageUp,
prior
switch-tocompletions
CHAPTER 8 MINIBUFFER
Key
Command
Description
Completion commands from the completion list buffer that has CompletionList mode.
Key
Command
Description
RET
choose-completion
RIGHT
next-completion
LEFT
previouscompletion
8.4.3
Completion Exit
{Note: TODO}
8.4.4
{Note: TODO}
8.4.5
Completion Options
{Note: TODO}
8.5
Minibuffer History
Key
Command
Description
M-p
previoushistory-element
M-n
next-historyelement
UP
previous-lineor-historyelement
DOWN
next-line-orhistory-element
M-r regexp
RET
previousmatchinghistory-element
10
Key
Command
Description
M-s regexp
RET
next-matchinghistory-element
8.6
Key
Command
Description
C-x ESC
ESC
repeat-complexcommand
C-u n C-x
ESC ESC
repeat-complexcommand
M-x listcommand-history
RET
8.7
Entering Passwords
{Note: TODO}
8.8
Yes or No Prompts
Chapter 9
Command
Description
M-x
execute-extendedcommand
11
CHAPTER 10 HELP
Chapter 10
Help
{Note: TODO}
10.1
Help Summary
{Note: TODO}
10.2
{Note: TODO}
10.3
{Note: TODO}
10.4
Apropos
{Note: TODO}
10.5
{Note: TODO}
10.6
{Note: TODO}
10.7
{Note: TODO}
10.8
{Note: TODO}
10.9
Help Files
{Note: TODO}
12
10.10
{Note: TODO}
Chapter 11
Key
Command
Description
C-SPC,
C-@
set-markcommand
C-x C-x
exchange-pointand-mark
Dragmouse-1
TODO
mouse-3
mouse-davethen-kill
Shift selection?
11.2
Key
Command
Description
M-@
mark-word
C-M-@
mark-sexp
M-h
mark-paragraph
C-M-h
mark-defun
13
11.3
{Note: TODO}
11.4
{Note: TODO}
11.5
{Note: TODO}
11.6
Shift Selection
{Note: TODO}
11.7
{Note: TODO}
Chapter 12
{Note: TODO}
12.1.1
Deletion
{Note: TODO}
12.1.2
Killing by Lines
{Note: TODO}
12.1.3
{Note: TODO}
12.1.4
{Note: TODO}
12.2
Yanking
{Note: TODO}
14
12.2.1
{Note: TODO}
12.2.2
{Note: TODO}
12.2.3
Appending Kills
{Note: TODO}
12.3
{Note: TODO}
Chapter 13
TODO Registers
Chapter 14
TODO Display
Chapter 15
Search
15.1
Incremental Search
Key
Command
Description
C-s
isearch-forward
C-r
isearch-backward
15
CHAPTER 15 SEARCH
15.1.1
Key
Command
Description
C-s
isearch-forward
C-r
isearchbackward
RET
isearch-exit
ESC ESC
ESC
isearch-cancel
C-g
isearch-abort
15.1.2
Key
Command
Description
C-s
isearch-repeatforward
C-r
isearch-repeatbackward
M-p
isearch-ringretreat
M-n
isearch-ringforward
16
Key
Command
Description
M-e,
mouse-1 in
the
minibuffer
isearch-editstring
RET
exit-minibuffer
C-s,
isearchforward-exitminibuffer
C-r
isearchreverse-exitminibuffer
C-f,
RIGHT
isearch-yankchar-inminibuffer
15.1.3
Isearch Yanking
Key
Command
Description
C-w
isearch-yankword-or-char
M-s C-e
isearch-yankline
C-u n M-s
C-e
isearch-yankline
C-y
isearch-yankkill
M-y
isearch-yankpop
mouse-2 in
the echo area
isearch-yank-xselection
C-M-w
isearch-delchar
C-M-y
isearch-yankchar
CHAPTER 15 SEARCH
15.1.4
Key
Command
Description
DEL
isearch-deletechar
C-g
isearch-abort
15.1.5
Key
Command
Description
M-s SPC
isearch-togglelax-whitespace
M-c,
M-s c
isearch-casefold
M-s '
isearch-togglechar-fold
M-s i
isearch-toggleinvisible
M-r,
M-s r
isearch-toggleregexp
M-s _
isearch-togglesymbol
C-\
isearch-toggleinput-method
C-
isearch-togglespecified-inputmethod
M-s o
isearch-occur
M-%
isearch-queryreplace
M-TAB
isearch-complete
18
Key
Command
Description
M-s h r
isearchhighlight-regexp
M-s h u
unhighlightregexp
Remove highlighting of
highlight-regexp.
C-h C-h
isearch-help-map
As in normal text, use C-j to input a newline character, use C-q or C-x 8 RET
to input other special characters.
15.1.6
15.1.7
15.2
Nonincremental Search
Key
Command
Description
nonincrementalsearch-forward
nonincrementalsearch-backward
M-x search-forward
RET
M-x search-backward
RET
15.3
Word Search
Key
Command
Description
M-s w
isearchforward-word
M-s w from
incremental
search
isearch-toggleword
M-s w RET
words RET
word-searchforward
M-s w C-r
RET words
RET
word-searchbackward
19
CHAPTER 15 SEARCH
15.4
Symbol Search
Key
Command
Description
M-s _
isearchforward-symbol
M-s _ from
incremental
search
isearch-togglesymbol
M-s .
isearchforward-symbolat-point
M-s _ RET
symbol RET
M-s _ C-r
RET symbol
RET
15.5
Key
Command
Description
C-M-s,
arg C-s
isearchforward-regexp
C-M-r,
arg C-r
isearchbackward-regexp
M-r while in
incremental
search
isearch-toggleregexp
C-M-s RET
re-searchforward
C-M-r RET
re-searchbackward
15.6
15.7
15.8
15.9
20
Key
Command
Description
M-s SPC
isearch-togglelax-whitespace
M-c,
M-s c
isearch-togglecase-fold
M-s '
isearch-togglechar-fold
15.10
Replacement Commands
15.10.1
Key
Command
Description
M-x replace-string
RET
15.10.2
Key
Unconditional Replacement
Regexp Replacement
Command
Description
M-x replace-regexp
RET
15.10.3
Query Replace
Key
Command
Description
M-% string
RET
newstring
RET
C-M-% regexp
RET
newstring
RET
query-replace
M-p
M-n
Prompt at each
match of regexp to
replace with
newstring.
21
CHAPTER 15 SEARCH
Command
Description
SPC,
y
DEL,
Delete,
BACKSPACE,
n
RET,
q
C-r
C-M-c from
recursive editing
leven
C-w
C-l
C-h,
?,
F1
22
15.11
Key
o in the occur
list
Command
Description
M-x multiisearch-buffers
RET
M-x
multi-isearchbuffers-regexp
RET
As arg M-x
multi-isearch-buffers RET.
M-x multiisearch-files
RET
M-x
multi-isearchfiles-regexp
RET
M-x occur RET,
M-x listmatching-files
RET
As arg M-x
multi-isearch-files RET.
23
CHAPTER 15 SEARCH
Key
Command
Description
C-o in the
occur list
C-x ` in the
occur list
next-error
e in the occur
list
C-c C-c in
Occur-Edit
mode
M-s o
M-x multi-occur
RET
M-x
multi-occur-inmatchingbuffers
RET
M-x how-many
RET
M-x flush-lines
RET
M-x keep-lines
RET
24
25
15.12
Chapter 16
TODO Fixit
Chapter 17
TODO Files
Chapter 19
TODO Buffers
Chapter 20
TODO Windows
Chapter 21
TODO Frames
Chapter 22
26
TODO International
Chapter 23
Key
Command
Description
C-x d
dired
C-x C-f
find-file
C-x 4 d
dired-otherwindow
C-x 5 d
dired-otherframe
q on Dired
buffer
quit-window
30.2
Key
Command
Description
C-n
next-line
n,
SPC
dired-next-line
As C-n.
C-p
previous-line
dired-previousline
As C-p.
DEL
dired-unmarkbackward
dired-goto-file
M-s f C-s
dired-isearchfilenames
M-s f
C-M-s
dired-isearchfilenamesregexp
30.3
27
Key
Command
Description
dired-flag-filedeletion
dired-unmark
DEL
dired-unmarkbackward
dired-do-flaggeddelete
30.4
Key
Command
Description
dired-flagauto-save-files
dired-flagbackup-files
dired-cleandirectory
dired-cleandirectory
% &
dired-flaggarbage-files
% d regexp
RET
dired-flagfiles-regexp
30.5
Key
Command
Description
f,
e,
RET
dired-find-file
28
Key
Command
Description
dired-find-fileother-window
C-o
dired-displayfile
mouse-1,
mouse-2
dired-mousefind-file-otherwindow
dired-view-file
dired-updirectory
30.6
Marks vs Flags
Key
Command
Description
m,
* m
dired-mark
n m,
n* m
dired-mark
* *
dired-markexecutables
arg * *
dired-markexecutables
* @
dired-marksymlinks
arg * @
dired-marksymlinks
* /
dired-markdirectories
arg * /
dired-markdirectories
* s
dired-marksubdir-files
29
Key
Command
Description
u,
* u
dired-unmark
n u,
n* u
dired-unmark
DEL,
* DEL
dired-unmarkbackward
n DEL,
n * DEL
dired-unmarkbackward
* !,
U
dired-unmarkall-marks
* ?
markchar,
M-DEL
dired-unmarkall-files
arg * ?
markchar,
arg M-DEL
dired-unmarkall-files
* C-p,
M-}
dired-prevmarked-file
t,
* t
dired-togglemarks
* c
old-markchar
newmarkchar
dired-changemarks
30
Key
Command
Description
% m regexp
RET,
* % regexp
RET
dired-markfiles-regexp
% g regexp
RET
dired-markfilescontainingregexp
C-/,
C-x u,
C-_
dired-undo
30.7
Operating on Files
For all of the commands in this section, if the command is passed a positive numeric argument n, then operate on the next n lines including the line containing
the cursor. If the command is passed a negative numeric argument n, then operate on the previous n lines including the line containing the point.
Otherwise, if there are marked lines, operate on those lines. Otherwise, operate on the current line.
Key
Command
Description
C new RET
dired-do-copy
dired-do-delete
R new RET
dired-do-rename
S new RET
dired-dosymlink
M modespec
RET
dired-do-chmod
Key
Command
Description
G newgroup
RET
dired-do-chgrp
O newowner
RET
dired-do-chown
T timestamp
RET
dired-to-touch
P command
RET
dired-do-print
dired-docompress
dired-docompress-to
:d
epa-dired-dodecrypt
:v
epa-dired-doverify
:s
epa-dired-dosign
:e
epa-dired-doencrypt
dired-do-load
dired-do-bytecompile
A regexp RET
dired-do-findregexp
Q regexp RET
to RET
dired-do-fineregexp-andreplace
Variant of xref-queryreplace-in-results..
Performs a query replace on the
files operated on.
30.8
32
Key
Command
Description
dired-do-shellcommand
n!
dired-do-shellcommand
&
dired-do-asyncshell-command
n&
dired-do-asynccommand
30.9
For all of the commands in this section, if the command is passed a positive numeric argument n, then operate on the next n lines including the line containing
the cursor. If the command is passed a negative numeric argument n, then operate on the previous n lines including the line containing the point.
Otherwise, if there are marked lines, operate on those lines. Otherwise, operate on the current line.
All the commands in this section operate interactively; they prompt to confirm
performing the operation on each line.
33
Key
Command
Description
% u
dired-upcase
% l
dired-downcase
% R regexp
RET to RET
dired-dorename-regexp
% C regexp
RET to RET
dired-do-copyregexp
% H regexp
RET to RET
dired-dohardname-regexp
% S regexp
RET to RET
dired-dosymlink-regexp
30.10
Comparison in Dired
Key
Command
Description
dired-diff
30.11
Subdirectories in Dired
Key
Command
Description
dired-maybeinsert-subdir
34
30.15 UPDATING
30.12
30.13
Key
Command
Description
C-x ]
forward-page
C-M-n
dired-next-subdir
As C-x ].
C-x [
backward-page
C-M-p
dired-prev-subdir
As C-x [.
C-M-u
dired-tree-up
C-M-d
dired-tree-down
<
dired-prevdirline
>
dired-nextdirline
30.14
Hiding Subdirectories
Key
Command
Description
dired-hide-subdir
M-$
dired-hide-all
30.15
Updating
Key
Command
Description
revert-buffer
35
Key
Command
Description
dired-doredisplay
dired-do-killlines
dired-sortdottle-or-edit
C-u s
switches RET
dired-listingswitches
36
30.15 UPDATING
37
30.16
TODO Find
30.17
TODO Wdired
30.18
TODO Image-Dired
30.19
TODO Misc
Chapter 31
TODO Calendar/Diary
Chapter 32
TODO Rmail
Chapter 34
TODO Gnus
Chapter 35