[bug #66864] [troff] `trf` content appears in `-a` output whereas `cf`'s does not

2026-03-04 Thread G. Branden Robinson
Update of bug #66864 (group groff):

  Status:   Postponed => None


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/


signature.asc
Description: PGP signature


[bug #66864] [troff] `trf` content appears in `-a` output whereas `cf`'s does not

2025-03-13 Thread G. Branden Robinson
Follow-up Comment #2, bug #66864 (group groff):


[comment #1 comment #1:]
> [comment #0 original submission:]
>> First, let's establish that this is a low-priority item.
> 
> No argument.
> 
>> Approximate output is a form of debugging output.
> 
> It's accurate to call it a previewing tool or a developer's tool (or, I guess
> the equivalent for someone who develops using roff, a typographer's tool).  I
> think calling it a debugging tool shortchanges it, as it has uses beyond
> what's traditionally considered debugging.  Especially when piped through
> subsequent commands or scripts, approximate output gives the user power to
> improve the typeset output, not merely to find bugs in it.  (For instance, I
> have a two-line perl script that reads "groff -a" output and lists all pages
> beginning with a widow.)  See item 2 of the original submission of bug #55278
> (and email threads that it links to).
> 
> None of this raises the priority of this ticket; I just want to squelch the
> idea that -a output is limited to debugging.

Fair point, Dave.  >>goozhe<<  Idea squelched.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/


signature.asc
Description: PGP signature


[bug #66864] [troff] `trf` content appears in `-a` output whereas `cf`'s does not

2025-03-09 Thread Dave
Follow-up Comment #1, bug #66864 (group groff):

[comment #0 original submission:]
> First, let's establish that this is a low-priority item.

No argument.

> Approximate output is a form of debugging output.

It's accurate to call it a previewing tool or a developer's tool (or, I guess
the equivalent for someone who develops using roff, a typographer's tool).  I
think calling it a debugging tool shortchanges it, as it has uses beyond
what's traditionally considered debugging.  Especially when piped through
subsequent commands or scripts, approximate output gives the user power to
improve the typeset output, not merely to find bugs in it.  (For instance, I
have a two-line perl script that reads "groff -a" output and lists all pages
beginning with a widow.)  See item 2 of the original submission of bug #55278
(and email threads that it links to).

None of this raises the priority of this ticket; I just want to squelch the
idea that -a output is limited to debugging.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/


signature.asc
Description: PGP signature


[bug #66864] [troff] `trf` content appears in `-a` output whereas `cf`'s does not

2025-03-02 Thread G. Branden Robinson
URL:
  

 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 
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

hello
world
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-1.22.3/bin/groff -a
| cat -s

hello
# this is a trout/grout comment
world
$ printf 'hello\n.cf ATTIC/trf-fodder\nworld\n' | ~/groff-HEAD/bin/groff -Ua |
cat -s

hello
world
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ~/groff-HEAD/bin/groff -a |
cat -s

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:

  

___
Message sent via Savannah
https://savannah.gnu.org/


signature.asc
Description: PGP signature