>    >        The -build switch is intended to be used by the Emacs mh-e
>    > interface to nmh.  It implies -nowhatnowproc.  It causes a file
>    > <mh-dir>/draft to be created, containing the draft message that would
>    > normally be presented to the user for editing.  No mail is actually
>    > sent.
>
>Not using the -build switch directly, and while I am working in the end from
>Emacs/MH-E, I didn't think I wanted that.

It seems -build just gets rid of the prompting for a draft file/message,
looking at the source for comp(1).  But as you've discovered, dist
doesn't accept that.

>What is the purpose of -nowhatnowproc without -build then?

Ummm ... good question!  You could use it with repl to just generate a
reply draft, I suppose.

>dist -draftfolder +drafts -draftmessage new -whatnowproc send -form fmcomps 
>+inbox 277
>this prompted me:
>Use "/home/mcr/Mail/drafts/15"? y
>
>and this did the right thing, but can I suppress this query?

Huh, okay, boy, this is a bit of a pain.  That prompt comes from send(1).
send(1) says:

       send with no file argument will query whether the draft is the intended
       file, whereas -draft will suppress this question.

It seems that the issue is that the whatnowproc is not called with an
argument and the whatnow API (such that it is) passes all of the details
via environment variables.

THIS works:

        dist -editor send ...

But you still get a What Now? prompt.  Ah, but THIS works:

        dist -editor send ... < /dev/null

It seems one of the core problems is -whatnowproc exec()s the given
argument as-is without any space splitting, so you can't give an argument
to it.  So unless you use a wrapper script for send, using -editor is
the only "stock" option.  We should probably fix that.

--Ken

Reply via email to