You are not logged in.

#1 2023-07-14 00:23:25

pezz
Member
From: Geelong, Australia
Registered: 2010-05-23
Posts: 87

[SOLVED] Groff + most change in behaviour

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

#2 2023-07-14 06:19:38

seth
Member
Registered: 2012-09-03
Posts: 59,039

Re: [SOLVED] Groff + most change in behaviour

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…)

Online

#3 2023-07-14 06:33:03

pezz
Member
From: Geelong, Australia
Registered: 2010-05-23
Posts: 87

Re: [SOLVED] Groff + most change in behaviour

Ah thanks seth, I thought the repo had issues disabled, wasn't looking hard enough.

Thanks for the pointer.

Offline

#4 2023-07-14 07:55:36

pezz
Member
From: Geelong, Australia
Registered: 2010-05-23
Posts: 87

Re: [SOLVED] Groff + most change in behaviour

Offline

#5 2023-07-14 12:45:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Groff + most change in behaviour

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

#6 2023-07-14 13:13:24

pezz
Member
From: Geelong, Australia
Registered: 2010-05-23
Posts: 87

Re: [SOLVED] Groff + most change in behaviour

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

#7 2023-07-14 13:46:52

seth
Member
Registered: 2012-09-03
Posts: 59,039

Re: [SOLVED] Groff + most change in behaviour

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.

Online

#8 2023-07-14 14:30:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Groff + most change in behaviour

seth wrote:

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

#9 2023-07-14 14:53:17

dogknowsnx
Member
Registered: 2021-04-12
Posts: 652

Re: [SOLVED] Groff + most change in behaviour

export GROFF_NO_SGR=1

does it for me (https://gitlab.archlinux.org/archlinux/ … e1771a42d8)


RI - Rest your Eyes and Self

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#10 2023-07-14 14:59:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Groff + most change in behaviour

Awesome!  That export works for my use-cases too.  Thanks.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2023-07-14 18:11:15

seth
Member
Registered: 2012-09-03
Posts: 59,039

Re: [SOLVED] Groff + most change in behaviour

"env -i TERM=rxvt-unicode-256color bash" indeed gets me the ugly thing with the underlines (how can normal users exist like that wink)
"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"
wink

Online

#12 2023-07-14 19:17:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Groff + most change in behaviour

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

#13 2023-07-14 23:34:19

pezz
Member
From: Geelong, Australia
Registered: 2010-05-23
Posts: 87

Re: [SOLVED] Groff + most change in behaviour

dogknowsnx wrote:
export GROFF_NO_SGR=1

Awesome, this fixes it.

Thanks!

Offline

#14 2023-07-20 04:36:55

NuSkool
Member
Registered: 2015-03-23
Posts: 168

Re: [SOLVED] Groff + most change in behaviour

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

#15 2023-08-04 23:32:41

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 675

Re: [SOLVED] Groff + most change in behaviour

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

#16 2023-08-05 06:03:46

seth
Member
Registered: 2012-09-03
Posts: 59,039

Re: [SOLVED] Groff + most change in behaviour

The commit in #9 says "sgr is no longer part of groff package", so there can be no downside in explcitly not using it.

Online

#17 2023-08-06 14:33:23

Narthorn
Member
Registered: 2013-03-05
Posts: 4

Re: [SOLVED] Groff + most change in behaviour

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

Board footer

Powered by FluxBB