Web page hosting and cheap domain registration & search engine ranking services
  

 

Version of send: push

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

The command that sends your messages is called send. When you type s or send at a What now? prompt, the send program is executed. If you type p or push at the What now? prompt, send -push is run instead.

Here's a version of send called push. (This idea came from the Marshall Rose examples in the MH distribution, the miscellany/mtrenv directory.)

If you replace the whatnow program with push, it will send your draft message as soon as the interface you're using (like repl) starts the whatnowproc. This means that prompter, or any other editor, won't run at all. So you can't use push with commands like comp which need an editor to fill in the draft. It's useful, however, for programs like thanks that send "canned" messages, because you won't have to wait for a What now? prompt: your message is sent right away.

By the way, if you don't have a draft folder set up (the Section Draft Folder), you might do that before you use push.

  • Make a version of send called push (for help, see the Section Making a New Command Version).
  • Add an entry like the following to your MH profile (on MH 6.7 or after, if you use an Aliasfile: profile entry, you may not want the -alias aliasfile):
    push: -push -alias aliasfile draft_option_here
    

    The send command will ask you questions like this:

    Use "/yourMHdir/draft"?
    

    unless you add a -draft switch ahead of time, which will keep it quiet. If you are using a draft folder, replace draft_option_here with -draftfolder +drafts (where drafts is the name of your draft folder). Otherwise, replace it with -draft.

  • Add -whatnowproc push to the MH profile entry for those noninteractive commands (like thanks), which should bypass the What now? prompt.
    thanks: -form thankscomps -editor cat -query -whatnowproc push
    

    Using a different -whatnowproc than the default whatnow does more than just skip the What now? prompt. The thanks command (which, remember, is really a version of repl) first builds the draft message. Then, instead of passing the draft to whatnow, the thanks program passes the draft to push.

Finally, try it and be sure that your messages are really sent. (Somehow, this push command made me uneasy for a while because I was so accustomed to seeing the What now? prompt...)

 

 

 

 
 

Disclaimers: This document is provided as free service for the benefits of Active-Venture.com's web hosting customers only.

 
Quotes: