nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Thoughts: header/address parsing

2014-08-06 08:39:23
does not give me what I want. Parsing its output, distinguishing commas
used as delimiters, and commas within quotes, is not quite trivial.

I’m with Norm on the general principle. Fans of GUI mail readers
are unlikely to switch to using [n]mh, but one of the places
where it could really get traction is as a suite of general
purpose mail handling programmes (my request for a “basename”
format for mhstore is another example). For this to work, output
from nmh programmes needs to be structured so as to minimise the
pain of subsequent processing.

I don't disagree with those sentiments ... it's just ugly practical concerns
rear their heads.

Having fixed output from tools presents long-term challenges ... we have to
pick the RIGHT format, and if scripts start to rely on that we can't
easily change the output format.  That suggests we should use something
like mh-format to pick what to output.

However, mh-format has a problem with address lists; it can't really handle
them.  It can build up a list of addresses, but it can't do something
for each address in a list.  This is why things like %(ingrp) don't really
work.  So, what's the solution here?  Well, I've idly been thinking about
a loop construct for mh-format that could work on address lists; there
is the unused %[ %], so maybe something like:

%[{to} %(friendly)\n%]

Or, something like that.  More thought is needed.  Or maybe the solution
is to use Lua instead; I look forward to Lyndon's work there!

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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