On Fri, May 23, 2025 at 11:39 AM Peter Schaffter <pe...@schaffter.ca> wrote: > I have always been puzzled by the statement in the info docs, "The > value of '.j' for any adjustment mode is an implementation detail > and should not be relied upon as a programmer's interface." > > Are there differences in the values reported by \n[.j] between groff > and troff? Are the reported values from groff (b=1, c=3, r=5) > likely to change or be changed?
I'm not sure how anyone can answer the latter question. All of groff's current maintainers could insist that they have no plans to change the values, but that doesn't bind any future maintainers--or prevent any current ones from changing their mind--since the values are explicitly documented as not guaranteed. Similarly, one could test AT&T troff and groff to see if the values agree, but this too feels superfluous if one follows the groff documentation's advice and doesn't rely on specific values. Based on the quoted statement in the documentation, I would regard \n[.j]'s values as having meaning only within a single run of groff. CSTR#54 is less explicit about not relying on these values; all it says is, "The number register `.j` contains the current value of the `ad` setting; its value can be recorded and used subsequently to set adjustment." However, the fact that it doesn't document the meanings of any of the values suggests to me that it too made no guarantees about them. Is there a situation where having values persist across runs of groff enables otherwise unavailable functionality?