nmh-workers
[Top] [All Lists]

Re: mh-format incantation for non-empty body?

2021-08-02 11:51:02
So.  Is what I want possible?  It sure felt like it should be!

Did 'fmttest' not help you here?  Anyway, this sure seems to work for me:

% fmttest +inbox -message -format '%<{body}++%>' message-number

Prints "++" for a non-empty message, but nothing for an empty message.
Now if your message is not truely blank but has a space or newline or
two, you might need to add a %(trim) in there.  E.g.:

        %<(trim{body})++%>

If this isn't helpful, the -trace switch to fmttest might be useful.

--Ken

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