Using mh-e Top Odds and Ends
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 beyond recognition. 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 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, `
example, to modify the variable that controls printing, you could add:
(setq mh-lpr-command-format "nenscript -G -r -2 -i'%s'")
Customizing Printing talks more about this variable.
Variables can also hold Boolean values. In Emacs Lisp, the Boolean
nil, which means false, and
t, which means true.
Usually, variables are turned off by setting their value to
(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
nil value, because sometimes values other than
meaningful (for example, see
mhl-formfile, described in
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
and you can look at the code itself for examples. Look in the Emacs
Lisp directory on your system (such as `
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)
mh-. This prefix is reserved for the mh-e package. To
avoid conflicts with existing mh-e symbols, use a prefix like
or your initials.
 Perhaps you can find the online version of 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 email@example.com.Using mh-e Top Odds and Ends