Append Text with prompter.nopre

[previous] [next] [table of contents] [index]

MH message sending programs use prompter for filling in the header and collecting text for the body of the draft (unless you specify another editor). It's hard to change the way that prompter works, though, unless you make versions of it.

For example, there's no way to tell a command like forw which prompter switches you want to use. If you want forw to edit your draft with prompter -noprepend, commands like this do not work:

% forw -noprepend
forw: -noprepend unknown
% forw -editor "prompter -noprepend"
unable to exec prompter -noprepend: Permission denied
Just as bad, if you put the following entry in your MH profile, it will always be used for comp, repl, and dist, as well as forw:
prompter: -noprepend
Here's a version of prompter named prompter.nopre. It's nothing more than prompter -noprepend. But you can use this as an editor for some MH commands without affecting others. For example, after you set up prompter.nopre, the following entry in your MH profile will let you type a note after the message you're forwarding (instead of the default, before):
forw: -editor prompter.nopre
To set it up:
  1. Make a new version of prompter named prompter.nopre (see the Section Making a New Command Version).
  2. Put the following entry in your MH profile. (I also add -rapid to the end of this entry. That tells prompter to let you add text immediately, without showing the rest of the draft. It saves time, especially on slow dialup lines, but it may confuse people who are used to seeing the whole draft shown before the What now? prompt. The -rapid switch is documented in your online prompter(1) manual page.)
    prompter.nopre: -noprepend
    
  3. Decide which MH mail-sending commands should use prompter.nopre as an editor. (For instance, you probably want replx and follx to use it; you may not want forw to use it.) Fix the MH profile entries for those commands to include -editor prompter.nopre.

[Table of Contents] [Index] [Previous: Show MIME Message Parts with showpart] [Next: Version of send: push]


Last change $Date: 1996/06/06 15:14:56 $

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>