You can combine mutt and (x)emacs quite conveniently, in case you happen to use this combination of tools to send your mail.


First, let's make sure UTF-8 is used by both (to avoir horrible accent mis-rendering) by putting something like this in your .emacs/.xemacs init files

(setq locale-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

It may even help to add this

(when (not (string= (getenv "LC_CHARMAP") "UTF-8"))
  (setenv "LC_CTYPE" "en_US.UTF-8")
  (setenv "LC_CHARMAP" "UTF-8"))
mutt mode

Then, download mutt.el as available for example from and change the pattern for mutt buffers to read

(defcustom mutt-file-pattern "mutt-a-z+-0-9a-f+-0-9a-f+-0-9a-f+"
  "*Regular expression which matches Mutt's temporary files."
  :type 'string
  :group 'mutt)

Put the modified mutt.el it in your emacs/xemacs load path, and make sure your load it by puttin

(require 'mutt)

in your init files.


To avoid relaunching (x)emacs each time you write a message, it is better to turn your emacs into a server process; for this, add these two lines in your init files

(require 'gnuserv)

Now, tell mutt to use (x)emacs as a mail client by adding this line in your .muttrc:

set editor="gnuclient"

And that's it.... every time you send a message, you will be in a mutt-mode that has nice commands like

C-c tab		mutt-goto-signature 
C-c C-a		mutt-attach-file
C-c C-b		mutt-goto-body
C-c C-i		mutt-goto-signature
C-c C-d C-c	mutt-delete-old-citations
C-c C-d C-s	mutt-delete-quoted-signatures

Just remember to exit the (x)emacs buffer using C-c #