Hi Johan, > 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}) ! %| %>
No, that I know of. I was thinking an environment variable could be set to be " 42 314 " and the %(getenv) used with %(match) to check if %(msg), wrapped with spaces, was present, i.e. does " 42 314 " contain " 314 ", but that doesn't work. FOO=".`mark -s foo -list | sed 's/^[^:]*: //; y/ /./'`." \ fmttest -message -format \ ',%(void (getenv FOO)),%(putlit),%(msg) %<(match .%(msg).)t%|f%>,' \ 42 314 1718 I found the trailing space was removed from the environment variable, so switched to full stops above. But %(match) is matching the literal text ".%(msg" so I can't get the current message number. My other idea was to have scan output a marker that's evaluated by something wrapping its output. So pick an unusual byte sequence that has the width of your desired indicator for present in sequence, have scan output that, then the name of the sequence you want to check using %(zputlit) so scan doesn't take note of its width. Spot these in scan's output, evaluate, and replace with the indicator or space. But I haven't tried it, so there's bound to be problems, this being mh-format(5). -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy _______________________________________________ Nmh-workers mailing list Nmh-workers@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-workers