general


C-x C-c save-buffers-kill-emacs ask for saving the buffers and quit emacs (with a prefix, the saves are automatically done)

C-_
C-x u
undo
advertised-undo
undo

C-x z
repeat
repeat the last modification (simply type z to repeat once again)

C-z
iconify-or-deiconify-frame
iconify the window


set-variable
set a variable


truncate-line (variable)
if nil, lines are wrapped
otherwise each line of the file is a line on the screen (and a horizontal line is available)

server




server-start start the server
once this is done, simply run emacsclient from the shell to edit a file within emacs
emacsclient is blocked until the end of edition, indicated by C-x #, except if it has been run with the option --no-wait

use gnuserv-start with xemacs (see this page)


C-x #
server-edit
switch to the next buffer
it is was the last one, notify the client

navigation



C-x = what-cursor-position display the current cursor position and the next character

M-<
beginning-of-buffer
put the cursor at the buffer beginning

M-> end-of-buffer put the cursor at the buffer end

M-g goto-line put the cursor at a given line

C-x l
count-lines-page
Report number of lines on current page, before and after point


line-number-mode
toggle the display of the line number in the mode line (otherwise the percentage is displayed)


goto-char
put the cursor at a given position

C-a beginning-of-line put the cursor at the line beginning

C-e end-of-line put the cursor at the line end

C-l recenter redisplay the buffer with the current line at the middle

C-b
LEFT
backward-char
move backward of one character

C-f
RIGHT
forward-char
move forward of one character

C-p
UP
previous-line
move backward of one line

C-n
DOWN
next-line
move forward of one line

M-b
backward-word
move backward of one word

M-f
forward-word
move forward of one word

M-a
backward-sentence
move backward of one sentence

M-e
forward-sentence
move forward of one sentence

M-[
backward-paragraph
move backward of one paragraph

M-]
forward-paragraph
move forward of one paragraph

C-x [
backward-page
move backward of one page

C-x ]
forward-page
move forward of one page

C-v
next
scroll-up
scroll the window toward the top

M-v
prior
scroll-down
scroll the window toward the bottom

C-x >
C-prior
scroll-right
sroll the window toward the right

C-x <
C-next
scroll-left
scroll the window toward the left

M-C-v
M-next
scroll-other-window
scroll the next window upward

M-S-C-v
M-prior
scroll-other window-down
scroll the next window downward

mark



C-space
C-@
set-mark-command set the mark at the current positon

C-x C-x
exchange-point-and-mark
invert the mark and the current position

M-h
mark-paragraph
set the current position a the paragraph beginning and the mark at the paragraph end

C-x C-p
mark-page
set the current position a the page beginning and the mark at the page end

C-< mark-beginning-of-buffer set the mark at the buffer beginning

C-> mark-end-of-buffer set the mark at the buffer end

C-x h
mark-whole-buffer
put the current position at the buffer beginning and the mark at buffer end

region



C-x n n narrow-to-region restrict edition to current region

C-x n w
widden
suppress edition restriction

register



C-x g insert-register insert the content of a register

C-x x
C-x r s
C-x r x
copy-to-register
copy region into register


append-to-register
append region to register


prepend-to-register
prepend region to register

search



C-s isearch-forward incremental search forward

C-r isearch-backward incremental search backward

M-C-s isearch-forward-regex incremental research forward for regular expression

M-C-r
isearch-backward-regexp
incremental research backward for regular expression

édition



C-q quote-insert read next input character and insert it

C-t
transpose-chars
interchange the two characters around point

M-t transpose-words interchange the two words around point

C-x C-t transpose-lines exchange current line and previous one


transpose-line-up
move current line one line up


transpose-line-down
move current line one line down


transpose-paragraphs
interchange current paragraph with the previous one

M-^
delete-indentation
join la ligne courante à la ligne précédente


sort-lines
trie les lignes de la région par ordre alphabétique

C-x C-l
downcase-region
passe les caractères de la région en minuscules

C-x C-u
upcase-region
passe les caractères de la région en majuscules

DEL
backward-delete-char-untabify
détruit le caratère précédent en transformant les tabs en espaces

C-d
delete-char
détruit le caractère courant

M-d
kill-word
détruit la fin du mot courant

C-k kill-line détruit la fin de la ligne courante

M-k
kill-sentence
détruit la fin de la phrase courante

C-w kill-region détruit le texte entre le point (curseur) et la marque


erase-buffer
efface le contenu du buffer (le narrowing n'est pas pris en compte, le contenu n'est pas mis dans la kill ring)

M-w
kill-ring-save
met la région dans la kill ring sans la détruire

C-y
yank
yank le dernier kill

M-y
yank-pop
yank le kill précédent

C-insert
copy-primary-selection
copy the selection to the clipboard and the kill ring

S-del
kill-primary-selection
copy the selection to the clipboard and the kill ring then delete it

S-insert
yank-clipboard-selection
insert the clipboard content at point

C-del
delete-primary-selection
delete the selection without copying it to the clipboard or the kill ring

C-o open-line insère un newline avant la position courante

M-%
query-replace
remplace une chaîne de caractères par une autre

C-M-%
query-replace-regexp
remplace une regexp par une autre

C-x i
insert-file
insère le contenu d'un fichier après le curseur


insert-buffer
insère le contenu d'un buffer après le curseur


append-to-buffer
append to specified buffer (before its point) the content of the region

M-C-\
indent-region
indent each line in the region


untabify
convert all tabs in region into multiple spaces


tabify
convert multiple spaces in region into tabs if possible

C-x RET f
set-buffer-file-coding-system
XEmacs only
change le coding system d'un fichier

C-x RET c
universal-coding-system-argument
exécute la prochaine commande avec un coding system donné

insert
overwrite-mode
toggle insert/overwrite mode

buffer menu


 
Buffer-menu-mode switch the buffer to buffer menu mode
Buffer Menu
1
Buffer-menu-1-window
display this buffer in full frame
Buffer Menu
2
Buffer-menu-2-window
display this buffer is a window and the previous one in the other window
Buffer Menu
f
RET
Buffer-menu-this window
display this buffer in this window
Buffer Menu
o
Buffer-menu-other-window
display this buffer in the other window
Buffer Menu
m
Buffer-menu-mark
mark this buffer as to be displayed
Buffer Menu
v
Buffer-menu-select
close all windows and display this buffer and all the marked ones
Buffer Menu
s
Buffer-menu-save
mark this buffer as to be saved
Buffer Menu
d
k
Buffer-menu-delete
mark this buffer as to be deleted
Buffer Menu
u
Buffer-menu-unmark
unmark this buffer
Buffer Menu
x
Buffer-menu-execute
execute the marked commands

gestions des buffers



C-x s save-some-buffers ask for saving all or some of the existing buffers

C-x C-s save-buffer save the current buffer

C-x C-f
find-file
open a new buffer containing a file

C-x 4 f
find-file-other-window
open a new buffer containg a file, buffer is opened in the next window

C-x C-r
find-file-read-only
open a read-only buffer containing a file


toggle-read-only
toggle the read-only mode

C-x C-v
find-alternate-file
replace file in current buffer


recover-file
load the last autosaved copy of the file

 
revert-buffer
reload the original file (as currently writen on the disk) in the current buffer

C-x C-w
write-file
save the buffer in a file


append-to-file
append the content of the region to a file

C-x k
kill-buffer
destroy a buffer


bury-buffer
put the buffer at the end of the list of all the buffers

gestions des windows



C-x 0 delete-window détruit la window courante

C-x 1 delete-other-windows détruit toutes les windows sauf celle courante

C-x 2
split-window-vertically
coupe la window courante en deux verticalement

C-x 3
split-window-horizontally
coupe la window courante en deux horizontalement

C-x o
other-window
passe à la window suivante

C-x b
switch-to-buffer
change le buffer affiché dans la window

C-x 4 b
switch-to-buffer-other-window
change le buffer affiché dans la window suivante

C-x 4 C-o
display-buffer
affiche un buffer sans le rendre courant

C-x C-b
list-buffers
affiche la liste des buffers

C-x 4 b
switch-to-buffer-other-window
change le buffer affiché dans une autre window

C-x ^
enlarge-window
augmente la hauteur de la window courante


shrink-window
diminue la hauteur de la window courante

C-x {
shrink-window-horizontally
diminue la largeur de la window courante

C-x }
enlarge-window-horizontally
augmente la largeur de la window courante

C-x +
balance-windows
met toutes les windows avec la même hauteur


compare-windows
compare the current window with the next one starting at each window's point, the point of each window is moved where is the first difference

frame management



C-x 5 2 make-frame-command create a new frame containing the current buffer


make-frame
new-frame
create a new frame displaying the current buffer

C-x 5 f
open-file-other-frame
open a file in a buffer in a new frame

C-x 5 o
other-frame
select the next frame

C-x 5 0 delete-frame destroy the current frame

help


C-h k describe-key display the documentation of a function bound to a key sequence

C-h f
describe-function
display the full documentation of a function

 
describe-variable
display the full documentation of a variable

C-h a
hyper-apropos
display lists of functions and variables that match a regexp

C-h A
command-apropos
show commands (interactively callable functions) that match a regexp

C-h l
view-lossage
display the 'view-lossage-key-count' last input keystrokes and the 'view-lossage-message-count' last minibuffer messages

 C-h b
describe-bindings
display the key and mouse bindings

C-h F
view-emacs-FAQ
display the FAQ

C-h w
where-is
list the keys sequences that invoke a command

C-h n
view-emacs-news
display the release note


system-configuration (variable)
contain configuration Emacs was built for


emacs-version
returns the version of Emacs that is running
Help
q
help-mode-quit
close the help buffer

info


C-h i
info
open an Info buffer

C-h C-i
Info-query
open an Info buffer on a given page 

C-h C-c
Info-goto-emacs-command-node
search for command in emacs Info manual

C-h C-k
Info-goto-emacs-key-command-node
search for a key sequence in emacs Info manual

C-h C-f
Info-elisp-ref
search for a command in elisp info manual
Info
p
info-prev
go to the next node
Info
n
info-next
go to the previous node
Info
u
info-up
go to the superior node
Info
l
info-last
return to the last visited node
Info
q
Info-exit
exit Info
Info
i
Info-index
search for a string in the Info index
Info
,
Info-index-next
go to the next match of  'Info-index'


Info-directory-list (variable)
directories where emacs looks for the Info files; the environment variable INFOPATH can be used to add some directories

shell (GNU Emacs 19.34)




shell start a shell buffer

eshell


 
eshell
start an eshell session
eshell
UP
eshell-previous-matching-input-from-input
search backwards through input history for match for current input
eshell
DOWN
 eshell-next-matching-input-from-input search forwards through input history for match for current input.
eshell
C-c C-c
eshell-interrupt-process
interrupt the process
eshell
C-c C-s
list-processes
display a list of all processes
eshell
Tab
pcomplete
complete the file/directory name

version control



C-x v v  vc-next-action do the next logical step
- create an element if the file is not under configuration
- check out the file if it is not
- check in the file if it is checked out

C-x C-q
vc-toggle-read-only
checkout/checkin the file

C-x v u vc-revert-buffer uncheck out the file

C-x v l vc-print-log display the file history

printing




lpr-buffer print buffer contents
lpr-switches is a list of extra switches to pass to lpr

commandes



M-x execute-extended-command execute a command entered in the minibuffer

macros



C-x ( start-kbd-macro commence à enregistrer une macro

C-x )
end-kbd-macro
arrète l'enregistrement d'une macro

C-x e
call-last-kbd-macro
exécute la dernière macro enregistrée


name-last-kbd-macro
nomme la dernière macro enregistrée

C-u C-x (

exécute la dernière macro et ajoute de nouvelles commandes


insert-kbd-maro
insère la macro dans le buffer courant

interaction with the shell



M-! shell-command run a shell command

M-|
shell-command-on-region
execute a shell command on the current region, the output is put in the *Shell Command Output* buffer
with the C-u prefix, the content of the region is replaced by the output of the shell command


setenv
create, modify or destroy an environment variable
to destroy interactively a variable, use the C-u prefix


cd
change the current directory


pwd
return the current directory

 
grep
run grep
use C-x ` to go through the found matches

 
grep-find
run grep via find
use C-x ` to go through the found matches


manual-entry
display a man page

Comint


Comint
M-p
C-UP
comint-previous-input cycle backwards through input history
Comint
M-n
C-DOWN
comint-next-input
cycle forwards through input history
Comint
C-i
TAB
comint-dynamic-complete

C




c-mode switch the buffer to C mode
C
C-c C-c
comment-region
comment a region
(C-u C-c C-c to uncomment)

JDE




jde-mode switch the buffer to JDE mode
JDE
TAB
c-indent-command
properly indent the line
indent-tabs-mode variable indicates it the indentation must be done with tabs (if t) or with space (if nil)

senator




senator-minor-mode switch the buffer to senator in minor mode
senator
S-Button3
 senator-completion-menu-popup
display the completion popup menu
senator
C-c , Tab
C-c , C-i
senator-complete-symbol
complete the symbol under point
senator
C-c , j
senator-jump
jump to a given semantic symbol
senator
C-c, n
senator-next-token
jump to the next semantic token
senator
C-c , p
senator-previous-token
jump to the previous semantic token

HTML




html-mode switch the buffer to HTML mode

hexadecimal




hexl-mode switch the buffer to hexadecimal mode

Image




image-mode switch the buffer to hexadecimal mode
image
h
image-enter-hexl-mode
switch to hexadecimal mode
image
t
image-toggle-decoding
toggle text/image mode

Lisp




eval-buffer exécute le buffer comme étant du code Lisp

C-x C-e
eval-last-sexp
exécute la sexp avant la position courante

compilation




compile start a compilation after asking for the compilation command line
the default compilation command is defined by compile-command
(setq-default compile-command "clearmake -v -V debug")


recompile
start a compilation with the same command line as the previous compilation

C-x `
next-error
edit the file at the line indicated by the next regexp match in the grep result or in the compilation log

 
previous-error
edit the file at the line indicated by the previous regexp match in the grep result or in the compilation log
Compilation
C-c C-k
kill-compilation
stop the compilation
Compilation
C-m
C-c C-c
compile-goto-error
display the source code at the line corresponding to the error message point is on
Compilation
M-n
compilation-next-error
move point to next error message
Compilation
M-p
compilation-previous-error
move point to previous error message
Compilation
M-(
compilation-next-file
move point to the next error for a different file
Compilation
M-)
compilation-previous-file
move point to the previous error for a different file

impression




ps-print-buffer print the current file on a PostScript printer
with the C-u, save in a PostScript file

cosmetic




set-background-color change the backgorund color


list-colors-display
display the list of available colors


toggle-scroll-bar
display/undisplay the vertical scrollbars in current frame

librairies




load-library load a library


load-path (variable)
directories where emacs looks for the libraries (loaded by load-library); the environment variable EMACSLOADPATH can be used to prepend some directories

DOS support
dans emacs ?.?.? pour supprimer les carriage returns d'un fichier DOS
C-x RET c pour mettre le coding system iso-latin-1-unix
C-x C-f pour lire le fichier
M-% pour remplacer C-q C-M par rien
C-x C-s

replace ^f by newlines
M-% to replace C-q C-f by C-q C-j

xemacs 19.34.6 supports binary/text mode on DOS (indicated by B: or T: on the mode line).
Binary files are defined by the extensions listed in file-name-buffer-file-type-alist (but this seems to not work).
find-file-binary load a file in binary mode.
To correctly display the high half of ISO 8859 Latin1, execute standard-display-european.

xemacs 21.4.6 installation

emacs key bindings
(define-key global-map [(ctrl tab)] 'other-window)
(define-key global-map [(home)] 'beginning-of-line)
(define-key global-map [(end)] 'end-of-line)

xemacs key bindings
(global-set-key [C-tab] 'other-window)
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
(global-set-key [f5] 'next-error)



Last update: August 9th, 2004 - Laurent