6.6 Printing Your Mail

To print messages in MH-E, use the command P p (mh-ps-print-msg). You can print all the messages in a range (as in C-u P p 1 3 5-7 last:5 frombob RET, see Ranges). You can also send the output to a file with P f (mh-ps-print-msg-file). This command will print inline text attachments but will not decrypt messages. However, when a message is displayed in an MH-Show buffer, then that buffer is used verbatim for printing with the caveat that only text attachments, if opened inline, are printed. Therefore, encrypted messages can be printed by showing and decrypting them first. The commands P p and P f do not use the options mh-lpr-command-format or mh-print-background-flag, described below.

Colors are emulated on black-and-white printers with shades of gray. This might produce illegible output, even if your screen colors only use shades of gray. If this is the case, try using the command P C (mh-ps-print-toggle-color) to toggle between color, no color, and a black and white representation of the colors and see which works best. You change this setting permanently by customizing the option ps-print-color-p.

Another related function is the command P F (mh-ps-print-toggle-faces). This command toggles between using faces and not. When faces are enabled, the printed message will look very similar to the message in the MH-Show buffer.

MH-E uses the ‘ps-print’ package to do the printing, so you can customize the printing further by going to the ‘ps-print’ customization group.

An alternative to using the ‘ps-print’ package is the command P l (mh-print-msg) (the l is for line printer or lpr). You can print all the messages in a range. The message is formatted with mhl23 and printed with the lpr command.

The command P l uses two options. The option mh-lpr-command-format contains the Unix command line which performs the actual printing. The string can contain one escape, ‘%s’, which is replaced by the name of the folder and the message number and is useful for print job names. The default setting is "lpr -J '%s'". I use "mpage -h'%s' -b Letter -H1of -mlrtb -P" which produces a nice header and adds a bit of margin so the text fits within my printer’s margins. Normally messages are printed in the foreground. If this is slow on your system, you may elect to turn on the option mh-print-background-flag to print in the background. If you do this, do not delete the message until it is printed or else the output may be truncated. These options are not used by the commands P p or P f.


Footnotes

(23)

See the section Using mhl in the MH book.