Hi Ralph,

On 8/22/22 10:17, Ralph Corderoy wrote:
Hi Alejandro,

I fear that I might be making one of those structure definitions go
past the right margin, and there are so many, that it's not funny
rendering all of them to check

No, it's clearly a job for a machine.

$ cat longline.man
.TH a b c d
.SH foo
.nf
this is a very long line that will go past the 80-col right margin, and
I want to be warned about it.

That's two lines, and it didn't overrun the carriage here.

Thunderbird doesn't seem to like me.
I hope one day I find some time to learn how to use email properly.


.fi
$
$ groff -man -ww -z ./longline.man
$

Isn't that an implicit -Tps?  Do you still want an ‘>80’ warning when
it's not a -Tascii, etc?

I forgot the flag.  I meant -Tascii.


Here's modified test input and an alternative way to check.

     $ cat longline.man
     .TH a b c d
     .SH foo
     .nf
     this is a very long line that will go past the 80-col right margin, and \c
     I want to be warned about it.
     .fi
     $ groff -Tutf8 -man -ww longline.man |
     > awk 'length > 80 {print; e = 1} END {exit e}'
           this is a very long line that will go past the 80-col right margin, 
and I want to be warned about it.
     $ echo $?
     1
     $


I like that use of awk(1)!
I was never an awk(1) user, but this one I can't seem to replace it with simpler tools. Seems like the tool for the job!

Still, Branden and Ingo please consider this feature request.

Cheers,

Alex

--
Alejandro Colomar
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to