#1055814 man-db: Garbled display (escape sequences displayed) when using custom $LESS in lesskey

Package:
man-db
Source:
man-db
Description:
tools for reading manual pages
Submitter:
Benjamin Cama
Date:
2023-11-12 01:09:05 UTC
Severity:
normal
#1055814#5
Date:
2023-11-11 22:39:33 UTC
From:
To:
Dear Maintainer,

Since it seems my last man-db update, I get a garbled display for every
manpage: all escape sequences appear as-is. I traced it back to my
lesskey settings: I use the following in ~/.lesskey:

  #env
  LESS = -j 5

I have been using it for ages without problem, but today this makes the
man pages unusable. I do not know if this bug comes from man or less,
but when trying to understand where it comes from, it seems that the
$LESS env var that man passes to less to tell it to interpret escape
sequences is overridden by my custom lesskey setting. Removing my custom
setting makes man work properly. It used to work nicely before my
upgrade, i.e. I had correct man page display, and the 5 lines offset
from my setting.

Attached is the result from running "man --debug man"; the debug output
does not change whatever my less setting is.

The more I dig into this, the more I think this is a less problem, but
my last less upgrade dates from long ago, long before I witnessed this
problem.

I really do not understand where this could come from, but would be
happy to provide more detail and try more advanced debugging.

Regards,
-- Benjamin

#1055814#8
Date:
2023-11-12 01:07:09 UTC
From:
To:
Hi Benjamin,

At 2023-11-11T23:39:33+0100, Benjamin Cama wrote:

This might be due to a change to groff's Debian package for 1.23.0-1.
Let me suggest a couple of experiments you can try to decide the issue.

1. View a man page using "cat" as the pager.

$ MANPAGER=cat man ls

Do you see bold and/or italic text?

2. View a man page adding `-R` to the less(1) options.

$ LESS="-R -j 5" man ls

Do you see bold and/or italic text?

If the answer in both cases is "yes", then I think my hypothesis above
is the likely explanation.

https://sources.debian.org/src/groff/1.23.0-3/debian/changelog/#L53

But I could be wrong--let me know.

Regards,
Branden