[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Request for new command: addresses

From: David Levine
Subject: Re: [Nmh-workers] Request for new command: addresses
Date: Wed, 28 May 2014 23:39:38 -0400

Norm wrote:

> David Levine <address@hidden> writes:
> >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.

We'd get that for free because this is in whatnow.  And this is
independent of your addresses command.  It seems like something
we should fix anyway, but if there's no interest I won't invest
the time.

> I wonder, though, if would be less trouble to write a C program,

Less trouble for whom? :-)

If you want a standalone program to handle this task, I'd go
with Paul's suggestion of formail.  It's useful, flexible,
stable, documented, and tested.

> 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.

I'll leave that up to Ken.  He left some comments in uip/replsbr.c
that suggest it wouldn't be easy.

> Also, if that were done, then incorporating the -cc and -nocc
> options of repl would be natural, and I except, easy.

It wouldn't be that hard to add -[no]cc support to your
shell script.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]