[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Request for new command: addresses
From: |
norm |
Subject: |
Re: [Nmh-workers] Request for new command: addresses |
Date: |
Wed, 28 May 2014 07:34:27 -0700 |
David Levine <address@hidden> writes:
>> There are still a couple of minor problems:
>>
>> As I commented earlier, in this thread, there is nothing to prevent
>> some future version of repl using a different prompt. One way
>> to prevent that would be to put "Reply to:" in the man page.
>> I herewith request that.
>
>How's this?
>
> The -query switch modifies the action of -nocc type switch by interac-
> tively asking you if each address that normally would be placed in the
> "To:" and "cc:" list should actually be sent a copy. This is useful
> for special-purpose replies. The prompt format is
>
> Reply to address?
>
> That prompt will not change, so that scripts can rely on it. Note that
> the position of the -cc and -nocc switches, like all other switches
> which take a positive and negative form, is important.
>
>("address" in the prompt is italicized.) I also added a comment
>to the code. It's just on master: if OK, I don't see a reason
>not to add this to 1.6.
>
>> repl returns a non-zero exit code because of the the "-editor false"
>> arguments , as well as to actual errors, such as an
>> unreadable message. The script blissfully ignores the latter.
>> I don't think that problem is worth pursuing.
>It would be really easy to have repl exit with status of 2
>instead of 1 for the "-editor false" case or any other failure
>of the editor. But if we're going to touch that, I think that
>we should consider passing back the exit status from the editor
>(or attempt to invoke the editor, so return 127 if not found).
>editfile() currently maps any failure to a status of -2,
>starting at line 734 in uip/whatnowsbr.c. Its callers map that
>to 1. (buildfile() maps it to -1 but its caller ignores the
>return value.)
If you did that, then you should do for all of the composition commands.
I wonder, though, if would be less trouble to write a C program, starting with
the repl source, for an addresses command then trying to modify repl to
support a very clever and ingenious script approach to using repl. It would
certainly be cleaner. Also, if that were done, then incorporating the -cc and
-nocc options of repl would be natural, and I except, easy.
Norman Shapiro