[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warn about long lines
From: |
Alejandro Colomar |
Subject: |
Re: Warn about long lines |
Date: |
Mon, 22 Aug 2022 20:17:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 |
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/>
OpenPGP_signature
Description: OpenPGP digital signature
- Warn about long lines, Alejandro Colomar, 2022/08/21
- Re: Warn about long lines, Ralph Corderoy, 2022/08/22
- Re: Warn about long lines,
Alejandro Colomar <=
- Re: Warn about long lines, Ralph Corderoy, 2022/08/23
- Re: Warn about long lines, Alejandro Colomar, 2022/08/23
- Re: Warn about long lines, Ralph Corderoy, 2022/08/23
- Re: Warn about long lines, Alejandro Colomar, 2022/08/24
- Re: Warn about long lines, Alejandro Colomar, 2022/08/25
- Re: Warn about long lines, Ralph Corderoy, 2022/08/26
- Re: Warn about long lines, Alejandro Colomar, 2022/08/26
- Re: Warn about long lines, Ingo Schwarze, 2022/08/27
- Re: Warn about long lines, Ralph Corderoy, 2022/08/27
- Re: Warn about long lines, Alejandro Colomar, 2022/08/27