URL: <https://savannah.gnu.org/bugs/?66864>
Summary: [troff] `trf` content appears in `-a` output whereas
`cf`'s does not
Group: GNU roff
Submitter: gbranden
Submitted: Mon 03 Mar 2025 06:47:55 AM UTC
Category: Core
Severity: 2 - Minor
Item Group: Incorrect behaviour
Status: Postponed
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 03 Mar 2025 06:47:55 AM UTC By: G. Branden Robinson <gbranden>
The way we explain `trf` would seem to be a form of `cf` that is more careful
about filtering out invalid input characters.
But they behave differently in "approximate" output, and seem to have done so
since _groff_ 1.22.3 or earlier.
First, let's establish that this is a low-priority item. Approximate output
is a form of debugging output. There are no problems with formatted output or
"grout".
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-1.22.3/bin/groff
-Tascii | cat -s
hello
world
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-HEAD/bin/groff
-Tascii | cat -s
hello
world
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-1.22.3/bin/groff
-Tascii -Z | cat -s
x T ascii
x res 240 24 40
x init
p1
x font 1 R
f1
s10
V40
H0
md
DFd
thello
n40 0
# this is a trout/grout comment
V80
H0
tworld
n40 0
x trailer
V2640
x stop
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-HEAD/bin/groff
-Tascii -Z | cat -s
x T ascii
x res 240 24 40
x init
p1
x font 1 R
f1
s10
V40
H0
md
DFd
thello
n40 0
# this is a trout/grout comment
V80
H0
tworld
n40 0
x trailer
V2640
x stop
I leave the substitution of the `cf` request in the above as an exercise for
the reader.
Now let's see where they **are** different, and have been for a decade or
more.
$ printf 'hello\n.cf ATTIC/trf-fodder\nworld\n' | ~/groff-1.22.3/bin/groff -Ua
| cat -s
<beginning of page>
hello
world
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-1.22.3/bin/groff -a
| cat -s
<beginning of page>
hello
# this is a trout/grout comment
world
$ printf 'hello\n.cf ATTIC/trf-fodder\nworld\n' | ~/groff-HEAD/bin/groff -Ua |
cat -s
<beginning of page>
hello
world
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-HEAD/bin/groff -a |
cat -s
<beginning of page>
hello
# this is a trout/grout comment
world
There is a case to be made for representing nodes that are not formatted text
in approximate output. Heirloom Doctools _troff_ has some features along
these lines, if I recall correctly. (Or maybe DWB originated them.)
But whatever that case is, I don't think it should handle `cf` and `trf`
differently.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66864>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
