Follow-up Comment #6, bug #67347 (group groff):

Hi Ingo,

At 2025-07-29T12:17:21-0400, Ingo Schwarze wrote:
> Follow-up Comment #5, bug #67347 (group groff):
>>> Maybe before committing to the semantic change, you should research
>>> who introduced \) when, and whether they provided a rationale.
>
>> It appears to go "all the way back", or practically so.
>> https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/troff/input.c?h=1.02#n782
>
> Aha, interesting, thank for figuring that out.

As you noted in our concurrent discussion less leavened with comity (bug
#67372), I'm prone to jaunts of historical research with only slight
provocation. ;-)

> The oldest version of groff known to me is groff-1.01 (released Mar
> 13, 1991) that was distributed with 4.3BSD-Net/2 (released Aug 20,
> 1991).  That's almost three months older than the groff-1.02 (released
> June 2, 1991) where our git repo starts.  I don't know why esr@ chose
> to not include 1.01 when he created the repo in 2013.

I assume that he was unaware of that resource's existence; he tends to
lack interest in things he can't put his name on.  The TUHS "Wayback
Machine" had an archived copy of Net/2 online as far back as 2010.

https://web.archive.org/web/20100308141419/https://minnie.tuhs.org/cgi-bin/utree.pl

> It was certainly available, for example here:
> https://minnie.tuhs.org/cgi-bin/utree.pl?file=Net2/usr/src/usr.bin/groff

Yup--an invaluable resource, and the CSRG did us all a great service by
electing to ship _groff_ once James Clark marked it as production-ready.

(As I understand it, there was no "groff 1.00"; since the minor version
number was exposed in the language via the `.y` register, this may have
been a deliberate choice to ensure that the value wasn't "false" when
evaluated as a *roff conditional expression.)

> That said, ESCAPE_RIGHT_PARENTHESIS is already in 1.01,
> and i see these entries in the ChangeLog:
>
> Wed Jul 18 10:23:31 1990  James Clark  (jjc at yquem)
> * troff/input.c (token::next): New escape sequence \).
> * troff/input.c (get_copy): Recognize \) in copy mode.
> (and much other stuff in the same commit, but no rationale for any
> of the changes)
>
> Even groff-1.01 did not include tmac.doc, so i very much doubt that
> the invention of \) was motivated by mdoc(7) about eight months
> earlier.

He might have been aware of its existence; the fact that the CSRG
adopted _groff_ so swiftly suggests to me that there was mutual
awareness between him and that group.

But I grant that I'm speculating.

> Then, the groff-1.02 CHANGES file contains:
>
> "A slightly modified version of the Berkeley tmac.doc is included."
>
> But even that was only mdoc(7) version 2, not the mdoc(7) version 3
> used in 4.4BSD (and today) and version 2 did not use \),
> see
> https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/macros/tmac.doc?h=1.02
> .

Mmm-hmm!

I think it's _possible_ that some of the same factors that dissatisfied
Livingston and other mdoc developers such that they overhauled the
package from version 2 to 3 were also expressed to Clark and motivated
him to put `\)` into the language.

But my slender reed of conjecture is getting slimmer.  I've had my eyes
open for the "award-winning" SoftQuad _troff_ manual for about as long
as I've been a _groff_ developer and I've never seen hide nor hair of
it.  That manual, in any edition, would throw much valuable light on
Clark's decisions and goals early in _groff_ development.

> I remember once talking (via email) directly to Cynthia, and she said
> that the CSRG insisted that her macros be compatible with both
> Kernighan troff and GNU troff, even though ditching Kernighan compat
> and going GNU only would have made her life so much easier (and the
> macros faster), but she wasn't allowed to.

Yes, a heroic stand on the part of CSRG leadership. <cough>

> James Clark switched to mdoc(7) version 3 in groff-1.05 (released
> March 18, 1992)

This is valuable history--thank you!

> https://cgit.git.savannah.gnu.org/cgit/groff.git/commit/macros/tmac.doc?h=1.05
> but even there, i see no trace of \), which is hardly surprising given
> that Cynthia needed Kernighan compat.

That would seem to slim my reed down to a monofilament.  I can still
imagine that mdoc's in-house parser motivated the creation of `\)`, but
I have to also posit some extreme developer inertia, or a militant
commitment to Kernighan _troff_-compatible grammar by engineering
managers of sufficient strength to override developer initiative.

> It seems to me \) first appeared in doc.tmac here:
>
> groff commit 058f72af wl@ Mar 23, 2001
> Replaced mdoc implementation.
>
> almost a decade after groff grew \).

By then, BSDI had been wound up along with its principals' glittering
pecuniary ambitions, the copyleft/GNU/Linux v. permissive/*BSD/Apache
battle lines had hardened, both camps had developed internal schisms,
vulture capital had come and (largely) gone with the dot-com market
crash, DWB _troff_ had been murdered as a commercial product in an
internal Bell Labs screw job, it had become clear that Kernighan
_troff_ was unlikely to ever enjoy wide distribution under *any* terms,
and people like Bruce Perens and Eric Raymond had decided that the
future of all human-written text lay in HTML format.  (The cool kids
knew better--it was totally gonna be XML.)

In other words, the stakeholders who foreclosed Livingston's preference
a decade earlier had moved on to other things and nobody else was paying
any attention.

> It should be easy for you to ask Werner why he chose to use \),
> certainly easier than first pulling off a full-blown
> reverse-engineering project.
>
> Werner's input on whether changing \) semantics is a wise move might
> also be valuable, and he might perhaps even know what jjc@'s original
> design idea was.

Yes.  It's been a while since I emailed him--this seems like a worthy
occasion to do so.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67347>

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

Attachment: signature.asc
Description: PGP signature

Reply via email to