nmh-workers
[Top][All Lists]
Advanced

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

Re: One-liner to retrieve an email's recipients?


From: Ken Hornstein
Subject: Re: One-liner to retrieve an email's recipients?
Date: Tue, 18 Aug 2020 13:59:55 -0400

>Thanks Ralph — I cottoned on to using
>
>  %(formataddr {to})%(formataddr {cc})%(putstr)
>
>as a merge trick, but there's no way of applying %(addr) to a list,
>right?  So your nice grep regexp there looks like it'd be one of the
>best ways of extracting the pure addresses after all..?

I mean, you CAN apply %(addr) to a list, but it will only work on the first
address.  And this exposes a weakness in the mh-format language (and is why
I said it was "mostly complete"): there's no way to perform an operation on
each address in a list of them.

I've thought about repurposing the never-used loop format (%[...]) to do
that.  I'd have to think about how that would work, though.  Maybe ...

%[{addr}%|body-of-loop%]

I would have THOUGHT being stuck at home during a global pandemic would
have given me more free time to work on nmh, but somehow the exact opposite
has happened.

--Ken



reply via email to

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