You are not logged in.
Hi there,
It appears that versions 1.23.0-1 and the latest 1.23.0-2 of groff cause the pager "most" to not produce colour output anymore.
Downgrading to groff 1.22.4-10 gets it working again, but I'm not sure where to post a bug for it.
Should I:
- Report it to the Arch bug tracker for groff?
- Report it to the Arch bug tracker for most / slang?
- Report it upstream to groff?
There doesn't appear to be any way to report bugs for most.
Any advice appreciated.
Last edited by pezz (2023-07-14 23:34:59)
Offline
https://github.com/jedsoft/most/issues
Possibly related to https://github.com/jedsoft/most/issues/9 (? only now heard about most for the first time…)
Offline
Ah thanks seth, I thought the repo had issues disabled, wasn't looking hard enough.
Thanks for the pointer.
Offline
For anyone following: https://github.com/jedsoft/most/issues/18
Offline
Technically it's a change in 'grotty' which is provided by the groff package. I have a related problem with my `man` implementation as the newest grotty dropped and X command for sgr 0 (resetting color) which a number of utilities have relied on.
Arguably a backwards incompatible API change in a minor version update could be argued to be a groff bug (especially if they ever claim to follow semantic versioning) - but I doubt anyone would care and the burden is on the utilities relying on grotty / groff to keep up regardless of version numbers.
Last edited by Trilby (2023-07-14 12:49:28)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks for the insightful reply Tril, appreciate it mate.
I just want most to give me my pretty coloured man pages, the whole reason I use it in the first place heh.
It's a tough call on who should make this right, I'm hoping the utilities can adapt, seems like the path of least resistance (maybe).
Offline
Why do I "just have" colored manpages?
I don't recall ever doing anything to that effect, certainly not https://wiki.archlinux.org/title/Color_ … Using_less and trying that actually breaks man?
This works in any TE and the console, I've red and green splashes on all manpages.
Offline
Why do I "just have" colored manpages?
That's certainly not the default. Do you use zsh? Do you set MANPAGER?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
export GROFF_NO_SGR=1
does it for me (https://gitlab.archlinux.org/archlinux/ … e1771a42d8)
Offline
Awesome! That export works for my use-cases too. Thanks.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
"env -i TERM=rxvt-unicode-256color bash" indeed gets me the ugly thing with the underlines (how can normal users exist like that )
"env -i TERM=rxvt-unicode-256color zsh" gets me the nifty regular colorful manpages i'm totally used to.
So does just "bash", so it's an environment variable…
This is what you get for mindless copypasta. A puzzle more than a … err "long time, I'm not old!" later one
# support colors in less
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
is in my zshrc, copied from the grml zshrc as "uhh, that's probably nice to have"
Offline
I use vim as my manpager, but I'm not even sure how to get it to work with the current man-db man, but busybox man works great:
export MANPAGER='col -b | vim -u ~/.vimmanrc --not-a-term -'
(And ~/.vimmanrc can be configured to your liking)
But now this requires the above mentioned GROFF_NO_SGR=1 too.
Last edited by Trilby (2023-07-14 19:21:04)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
export GROFF_NO_SGR=1
Awesome, this fixes it.
Thanks!
Offline
Just found this: https://bbs.archlinux.org/viewtopic.php?id=287306, which led me here.
Seems this update also broke my searching using the default man page pager, when including dashes, '--' and '-' but only in the mkosi man page.
No such issues with the bash man page.
Downgrading to groff 1.22.4-10 fixed it for now, and I'll look further into it.
EDIT 2023-07-20
Should I start a new thread for this?
Exported the following variable while using groff 1.23.0-2...
export GROFF_NO_SGR=1
Made no difference for my issue. Can anyone duplicate this to confirm for a bug report?
Last edited by NuSkool (2023-07-20 18:37:40)
Offline
export GROFF_NO_SGR=1
This fixes the lack of color problem for me also. Are there any side-effects/disadvantages of adding this?
Offline
The commit in #9 says "sgr is no longer part of groff package", so there can be no downside in explcitly not using it.
Offline
Another option is to use the man environment variable:
export MANROFFOPT=-c
which essentially does the same thing as GROFF_NO_SGR=1 but restricts it to only happen when man is invoked, leaving grotty free to output SGR in other contexts.
The core issue is that pagers like less and most expect their input to denote bold and italics not with SGR but with some legacy overstrike sequences like "char [backspace] char", that they can then interpret as bold/italics just so they can rewrite the text and end up outputting SGR sequences themselves in the end.
I suppose the "proper" fix would be having a groff config that actually outputs color instead of bold/italic, and then pagers wouldn't have to do anything except let those SGR sequences pass through (like with less's -R option).
Or, if the pagers insist on letting their output be customized, then they should interpret SGR directly just like they do with the legacy overstrike sequences.
Offline