nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Sequences in scan

2017-03-13 11:03:47
Is there anyway to check if a message is in a specific sequence for the scan
output. I can check `unseen` and `cur`, would be nice if I could do something
like this in my scan format file:

   %<(seq{my-seq}) ! %|   %>

"unseen" is sort of special; it is a defined sequence and plenty of
tools already have special handling for it.  The way %(unseen) works
is that the caller of the mh-format function has to figure out if the
message is on the unseen sequence and set the appropriate value in the
"dat" array (don't ask). %(cur) is handled in a similar way, but again
is another integer.

Making this work for arbitrary sequences isn't IMPOSSIBLE, but would
require another way to pass data from the compiled format program (to
know what sequences you're interested in) up to where the messages are
parsed, and then back to the format interpreter during execution.  This
is doable, but I don't know what it would look like.  That's another way
of saying, "It's more code than I personally want to do right now".

Ok, thanks for the explanation. I think I'll just write a small wrapper then.

-- 
Johan Viklund

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