Hi Anton, At 2024-06-13T00:43:01+0300, Anton Shepelev wrote: > > > Check your environment for variables named "GROFF_SGR" > > > (a Debianism) and "GROFF_NO_SGR". Unset them both and > > > try "groff -man -Tutf8" again. > > > > `export | grep -i sgr' finds nothing, unfortunately. > > Where else can I look for the reason of -man treating my > > virtual terminal as a printer? > > I forgot whether I reported my solution, and if I did, I do > not see my answer here, so here it is for the record. The > culprit is: > > /usr/share/groff/site-tmac/man.local > > which has the following: > > . \" Debian: Disable the use of SGR (ANSI colour) escape sequences by > . \" grotty. > . if '\V[GROFF_SGR]'' \ > . output x X tty: sgr 0 > > This means that one must /set/ rather than unset GROFF_SGR > to restore the normal nroff behavior.
This advice, while still applicable to groff 1.22.4, is becoming stale. Distributors that introduced the GROFF_SGR Debianism have now started to withdraw it when packaging groff 1.23.0. https://salsa.debian.org/debian/groff/-/commit/f0a34f20ff772f692255b7e32a05630c639f75a8 https://gitlab.archlinux.org/archlinux/packaging/packages/groff/-/commit/025a63b7e55a24c0a1892045819eef79fdc67873 > See also: > > <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750202> Ah, yes, that's when Texinfo maintainer Gavin Smith became convinced I was a moron--because only an idiot wouldn't suspect that there were distinct environment variables named "GROFF_NO_SGR" and "GROFF_SGR", with different origins, that affected the same behavior via different mechanisms. Good times! 😅 (I managed to remain ignorant of "GROFF_SGR" for something like 20 years because (1) for much of that time, as the Debian bug report notes, it was undocumented; and (2) unlike a startling number of people, I lacked a prurient desire to decorate man page renderings with all the colors of the ANSI X3.64 rainbow, and certainly not via the exercise of less(1) features that were _also_, at the time, undocumented!) Regards, Branden
signature.asc
Description: PGP signature