gbranden pushed a commit to branch master
in repository groff.

commit c8b6ba92a1a7f03ac85abe3d79a7a5ba659d8b3e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jan 22 11:47:41 2026 -0600

    grotty(1): Clarify point regarding col(1).
    
    While not incorrect, a common (cargo-culted) pattern seen in the wild is
    not to filter nroff output _simply_ through col(1), but to give that
    program flags as well, sometimes `-b` but frequently `-x` as well.  Each
    of those options performs a task other than interpretation/removal of
    reverse line feeds.
    
    `-b` "de-overstrikes" its input, deleting backspaces and the character
    preceding them so that the final character written to a character cell
    prevails.  (Unknown: how robust are they with _multiple_ overstrikes to
    a cell?)
    
    `-x` "expands" tabs, converting literal tabs to a sequence of spaces
    (presumably at every 8 character cells).
    
    You need none of this with grotty because you can disable overstriking
    in the first place if you opted into it with `-c` or `GROFF_NO_SGR`, and
    grotty doesn't output literal tabs in the first place unless you give it
    the `-h` option.
    
    Nevertheless, people (often Makefiles) invoking nroff (often on man
    pages) sometimes seek to operate indifferently to the nroff
    implementation.  (That's not necessarily a bad thing.)  While grotty
    crossed the SGR bridge in in groff 1.18 in 2002, requiring such
    Makefiles to disable SGR by one of the two means above, retention of
    "col -bx" is harmless (and redundant, if ul(1) is also used).
    
    (Why does the Unix world have both "col -b" _and_ "ul"?  Beats me.[1]  I
    wonder if the people who, thinking themselves clever, repeat Rob Pike's
    witticism about "cat(1) coming back from Berkeley waving flags" ever
    thought to turn that criticism to col(1).  I've seen no evidence that
    they ever have.)
    
    [1] Checking minnie.tuhs.org, I see that col(1) was apparently born in
        Seventh Edition Unix (1979), already sporting both `-b` and `-x`
        options (plus `-f`, permitting half-line motions for Teletype
        support).  ul(1) shows up in 3BSD (1980), credited to Horton.  So I
        guess Pike and his parrots cast no aspersions on col(1) because to
        do so would have pointed out a CSRC own-goal.  Partisanship FTW!
---
 src/devices/grotty/grotty.1.man | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/devices/grotty/grotty.1.man b/src/devices/grotty/grotty.1.man
index 32a6db6a4..d1bed7217 100644
--- a/src/devices/grotty/grotty.1.man
+++ b/src/devices/grotty/grotty.1.man
@@ -296,8 +296,10 @@ implementations,
 .I grotty
 never outputs reverse line feeds.
 .
-There is therefore no need to filter its output through
-.MR col 1 .
+You need not filter its output
+through
+.MR col 1
+to remove them.
 .
 .
 .\" ====================================================================

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to