Emacs Tips

Emacs as your IDE

You can get my emacs configuration files thus :

~$ tla register-archive jean-baptiste.note@m4x.org--libre-mirror http://jbnote.free.fr/{archives}/libre
~$ tla get jean-baptiste.note@m4x.org--libre-mirror/homedir--base

Emacs as mail reader

configuring gnus + bbdb

configuring gnus + gpg



One feature I always have to painfully search the web for is syntax for the lines which force emacs in a given mode upon opening the file. It's

# --shell-script-- make emacs load this in shell-script mode


; --lisp-- make emacs load this in lisp-mode


This site is published with Emacs-Wiki.

The markup is defined here :

Emacs Wiki markup

Some basic configuration info can be found here.

Sample more complex initialization script is emacs-wiki sample configuration.

Last but not least cool code for emacs-wiki.

I'd really like to find a cool CSS for this site. The default is not bad, though.

Emacs as your IDE

recursive edit

When replacing some text with M-% or M-C-% you may replace and edit the matches with C-w or just edit with C-r and leave recursive edit with M-C-c. This is usefull when you need to make replaces of some text, but in certain places it should differ.

stolen from


Indentation with emacs!

This site is full of tricks to better use emacs : Emacs as your IDE

And the FreeBSD doc : http://www.freebsd.org/doc/fr_FR.ISO8859-1/articles/programming-tools/emacs.html

And some other tricks : http://deesse.univ-lemans.fr/linuxcoding/download/dot_emacs

Yet another site with cool configuration tricks : config

And this really nice documentation, in French, about Emacs : emacs tutorial

From it, a nice tip :

C-h w (where-is)
Afficher les séquences de touches qui invoquent une commande dont on donne le nom. Plutôt utile.

Cscope is great too...

Index files
C-c s I
Find global definition
C-c s d
Find symbol definition
C-c s s
Find this file
C-c s f
Find functions calling this function
C-c s c
Find functions called by this function
C-c s C
Find this pattern
C-c s e
Find this text string
C-c s t
Find files including this file
C-c s i

In Hide-Show mode, use

Next line
Previous line
Next word
Previous word
Start of block
Indent block

Emacs misc


C-u C-space
back in the position history (in one buffer)

-- find same thing that would work accross buffers.

find closing brace
find opening brace

Emacs music

in lilypond-mode,

C-x C-f
formats buffer for postscript
C-x C-p
view postscript output

in lilypond-quick-mode,

C-c o
change to / from relative mode