Re: What is .pline ?

"G. Branden Robinson" <[email protected]> Mon, 13 Jul 2026 15:04:02 -0500
Newsgroups gmane.comp.printing.groff.general
Message-ID <20260713200402.my57diuc34zvm4uu@illithid>
Hi Jim & Dave,

At 2026-07-10T21:03:48-0700, Jim Avera wrote:
> At https://www.gnu.org/software/groff/manual/groff.html (5.37 GNU troff
> Internals), there is an example using the ".pline" request; this is
> supposed to display internal nodes:
> 
>    printf 'Gi\\[:u]\\%%seppe\n.pline\n' | groff -z 2>&1 | jq
> 
> With groff 1.22.4 this fails because groff says .pline is an unknown
> command.
> 
> I thought maybe a.pline request which outputs was added in a more
> recent release,

You were right!

> however "pline" is not described anywhere in the above html manual.

It's there.

https://www.gnu.org/software/groff/manual/groff.html.node/Debugging.html

Scroll down or search that page for `pline`.

At 2026-07-10T23:43:26-0500, Dave Kemper wrote:
> > (Also: Was -z or -Z intended?  "jq" is a JSON processor on my
> > system.)
> 
> I presume -z was intended; this tells groff to suppress stdout.  Then
> the following "2>&1" directs stderr to stdout so that it can be piped.
> The pline output is in JSON format.

Yes.  jq(1) becomes angry it is input is malformed.  Shushing groff's
standard output stream ensures that only output to standard error goes
to jq(1)'s standard input.

That input can _still_ be malformed if there's something else on the
standard error stream, like diagnostics from groff, troff, a
preprocessor, or an output driver; or a document that uses `tm` or a
similar request.

Regards,
Branden
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmpVRKoACgkQ0Z6cfXEm
bc7APg/9EABnDnYKlJpOjcZ/Q945v8EmRVpLhclQ6zEryZAUjUoz8SH6rNx+9Vk1
400P0lpP1NBd5vfZ6fMWJUIgifrm99RUDB/SsjnfvL0psOGXEMmtoTTHG3RQCxaB
0GPd/OU3reoI2U52W2xh9tFIGv7XxXKSNk6crsRL2UHz86htCn/NT9nxmA8h/cge
3mtiAWTJsE8tmXt/VDUbDxbP2il5T+93h9/n+dkFjby2cLrexip0UYhiyhL67fFh
fN5bikX9+i4OC+AeB7B14FUZeMvNxquyotaAPy2rUdchmc1n9h98nQRn6pHT+/2B
gftIWXNg7jnJ73te+7innTBhuGCsiX44E1NRvojVsEHDICbetUnAEmwJBA3RtQhb
BK3fuPxkMscrenWkXuA9khLwQQD6UiCVg8+TnwlTI1RetkjNCYDdHdOoERolieh3
J2fluREB+G52vD/5UaXzBADYiQzxeKpR0CbKpyITawVl4Umae3WkuRpKz6H04W/o
VfzCZV54LXg8bXsdc0hxc3kUQ2DKbwU+AY+dTixJGk12HjuKHPRO2MMcMHF8vakJ
Ilch3vd79FeXr2SjDToF2cO+lHMn0orP6+oBPuSc+a9jfrekaJG97gnwLe3wXLx3
1RxIRTBuVSQs8sSbkBmjfDrBpdyRkXcKjO1pTO8H6410EE9kAko=
=qLAY
-----END PGP SIGNATURE-----