GNU Info

Info Node: (mh-e)Customizing mh-e

(mh-e)Customizing mh-e


Next: Odds and Ends Prev: Using mh-e Up: Top
Enter node , (file) or (file)node

Customizing mh-e
****************

   Until now, we've talked about the mh-e commands as they work "out of
the box."  Of course, it is also possible to reconfigure mh-e to fit
the needs of even the most demanding user.  The following sections
describe all of the customization variables, show the defaults, and
make recommendations for customization.  The outline of this chapter is
identical to that of Note: Using mh-e, to make it easier to find the
variables you'd need to modify to affect a particular command.

   However, when customizing your mail environment, first try to change
what you want in MH, and only change mh-e if changing MH is not
possible.  That way you will get the same behavior inside and outside
GNU Emacs.  Note that mh-e does not provide hooks for customizations
that can be done in MH; this omission is intentional.

   Many string or integer variables are easy enough to modify using
Emacs Lisp.  Any such modifications should be placed in a file called
`.emacs' in your home directory (that is, `~/.emacs').  For example, to
modify the variable that controls printing, you could add:

     (setq mh-lpr-command-format "nenscript -G -r -2 -i'%s'")

   Note: Customizing Printing talks more about this variable.

   Variables can also hold Boolean values.  In Emacs Lisp, the Boolean
values are `nil', which means false, and `t', which means true.
Usually, variables are turned off by setting their value to `nil', as in

     (setq mh-bury-show-buffer nil)

   which keeps the MH-Show buffer at the top of the buffer stack.  To
turn a variable on, you use

     (setq mh-bury-show-buffer t)

   which places the MH-Show buffer at the bottom of the buffer stack.
However, the text says to turn on a variable by setting it to a
_non-`nil'_ value, because sometimes values other than `t' are
meaningful (for example, see `mhl-formfile', described in Note:
Customizing Viewing).  Other variables, such as hooks, involve a
little more Emacs Lisp programming expertise.

   You can also "preview" the effects of changing variables before
committing the changes to `~/.emacs'.  Variables can be changed in the
current Emacs session by using `M-x set-variable'.

   In general, "commands" in this text refer to Emacs Lisp functions.
Programs outside of Emacs are specifically called MH commands, shell
commands, or Unix commands.

   I hope I've included enough examples here to get you well on your
way.  If you want to explore Emacs Lisp further, a programming manual
does exist, (1) and you can look at the code itself for examples.  Look
in the Emacs Lisp directory on your system (such as
`/usr/local/lib/emacs/lisp') and find all the `mh-*.el' files there.
When calling mh-e and other Emacs Lisp functions directly from Emacs
Lisp code, you'll need to know the correct arguments.  Use the online
help for this.  For example, try `C-h f mh-execute-commands RET'.  If
you write your own functions, please do not prefix your symbols
(variables and functions) with `mh-'.  This prefix is reserved for the
mh-e package.  To avoid conflicts with existing mh-e symbols, use a
prefix like `my-' or your initials.

Customizing Reading
Customizing Sending
Customizing Draft Editing
Customizing Moving Mail
Customizing Searching
   ---------- Footnotes ----------

   (1) Perhaps you can find the online version of Note: The GNU Emacs
Lisp Reference Manual.  If not, you can order a printed
manual, which has the desirable side-effect of helping to support the
Free Software Foundation which made all this great software available.
You can find an order form by running `C-h C-d', or you can request an
order form from gnu@gnu.org.


automatically generated by info2www version 1.2.2.9