head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2006.05.29.14.31.25; author jpeek; state Exp; branches; next 1.3; 1.3 date 2006.05.28.04.27.15; author jpeek; state Exp; branches; next 1.2; 1.2 date 2006.05.26.23.59.01; author jpeek; state Exp; branches; next 1.1; 1.1 date 2006.05.26.22.12.07; author jpeek; state Exp; branches; next ; desc @mh-e_46.html page from mh-e section of "MH & nmh: Email for Users & Programmers" @ 1.4 log @Removed 'html/' from end of http://mh-e.sourceforge.net/manual/html/ URLs @ text @
This section of MH & nmh: Email for Users & Programmers is now the MH-E Manual. It's moved to http://mh-e.sourceforge.net/manual/.
If you aren't taken to the new site in 15 seconds, please click on the link above.
You may also want to visit:
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 section 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'")
section Printing Your Mail 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
section Viewing Your Mail). 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,
(14)
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.
Go to the first, previous, next, last section, table of contents.