When you show parts of messages with mhn -part, you'll see the message header before you see the part. You may have mhn configured to pause and prompt with "Press <return> to show content" before it displays body parts with that content-type. If you just want to see the contents of the part, you could configure mhn -store to write the part to its standard output -- but it wouldn't use a pager program and, besides, mhn -store has a bug in MH 6.8.3 that prevents writing to standard output.
The MH command version named showpart solves all of those problems. It shows a message part with a pager, with no header, and with no pause before the part. Unfortunately, showpart has to use undocumented mhn switches to do this: -nomoreproc and -moreproc. So showpart may not work after MH 6.8.3.
The first argument to showpart is the part number you want to see. Any other arguments can be additional mhn options and/or message numbers. For example, to show part 1 of messages 8 through 10:
% showpart 1 8-10To make showpart as a version of mhn, see the Section Making a New Command Version. To make an alias or function, see the Section Writing Command Versions as Aliases or Functions.
Add the following entry to your MH profile, or add the arguments to your alias or function. This entry uses the pager less(1); if you want to use a different pager, use its name instead:
showpart: -nomoreproc -moreproc less -nopause -form /dev/null -partThe option -form /dev/null gives mhl an empty format file so that mhl won't show any header fields.
[Table of Contents] [Index] [Previous: Edit Messages with show: mhedit] [Next: Append Text with prompter.nopre]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>