nmh-workers
[Top][All Lists]
Advanced

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

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


From: Paul Fox
Subject: Re: mh-format incantation for non-empty body?
Date: Mon, 02 Aug 2021 16:19:30 -0400

ken wrote:
 > >    %<(trim{body})++%>
 > 
 > That's what I get for being clever WITHOUT TESTING.  This won't work, but
 > this will:
 > 
 >      %<(nonnull(trim{body}))++%>
 > 


You always make it look so easy.  Sigh.  :-/ :-)  Thank you!

I sure wish I hadn't lost my work from that day.  I'll bet I was
very close.

As for fmttest -- yes, I looked at it, but the overhead of learning a
new debugging tool must be extremely low to make me change my
approach mid-stream.  In this case, fmttest has the typical (of MH
programs) rich-but-very-dense man page format, and by the time I got
half way through partially understanding what it offered me, I decided
it didn't look much better than what I was already doing:  I had three
windows open:  one running "scan -form test.form", another editing
"test.form", and a third editing changes to a test message.

(Anticipating your next "how would you improve the man page?" question: 
Unless I misunderstand, I suspect fmttest is far more likely to be
used in message mode than in address, raw, or date modes, and
therefore it should be the first one discussed, rather than the
last.  In addition, an example or two of how to use each of the modes
would be useful.  Having working command lines to start with would
reduce the amount of yak-shaving necessary to get back to debugging
my actual problem.)

But really:  it's not actually the debugging that's hard with mh-format. 
It's the language itself :-).  I actually spent some time a while ago
creating a (very primitive) "high level language" for generating
mh-format syntax, but in the end decided that unless I could also
translate existing mh-format syntax back to my "high level" format, it
wouldn't be very useful, since mostly what one does is modifiy existing
mh-format format strings.  (i.e., being able to make a format string
readable, then modify it, and then "compile" it again, would be really
helpful.)

paul
=----------------------
paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 74.3 degrees)




reply via email to

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