nmh-workers
[Top] [All Lists]

Re: [nmh-workers] Handling empty components

2019-03-23 00:45:46
Wow, thanks a lot, Ken!

I won't pick up the new %(trimr) function until Ubuntu pulls in
that version of NMH, so not before 20.04 (because it's the next
LTS release).

... Though, if you would like me to test this (and see if I can
come up with format code that is not ridiculously complex/long)
to see if it solves my particular issue (which it seems like it
should), I'm happy to pull down and build from sources!

                                Bob

On Fri, 22 Mar 2019 09:31:07 -0400 Ken Hornstein <kenh@pobox.com> sez:

Thanks guys for the quick reply and suggestions!

Ken:  yeah, I can see how messy that's going to be; alas that
%(trim) indeed doesn't return its result.  Although I'll probably
see this again, it'd be maybe 1x/year for the next couple years.
(And, who knows, maybe their IT department will fix it?  B-)  Not
worth complicating my replcomps; easier to just manually add the
"To:" field in vim.  B-)

I thought initially that %(trim) was recent, but no, it isn't
... it existed back in MH 6.8, and I am kinda surprised that
the authors of %(trim) didn't make it return a value, because
they actually knew the format engine pretty well (it has a
number of subtle bits of behavior that I have only learned
about after staring at the code for a while, and I wrote
fmttest(1) because it is so confusing).

We can't really change the behavior of %(trim), but we COULD
easily add a new function (maybe %(trimr) ?)  that would return
a value and be easier for you to use in this case.  But it
wouldn't appear until a new nmh was released.

--Ken



On Fri, 22 Mar 2019 12:03:04 -0400 Ken Hornstein <kenh@pobox.com> sez:

We can't really change the behavior of %(trim), but we COULD
easily add a new function (maybe %(trimr) ?)  that would
return a value and be easier for you to use in this case.  But
it wouldn't appear until a new nmh was released.

It turns out adding a %(trimr) function was literally one line
of code, so I added it.  Caveats about it not appearing until a
new release still apply, unfortunately.

--Ken

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>