Wed 26 Mar 2014 01:39:35 PM UTC, comment #1:
I agree that this looks like a glitch. However, it doesn't appear to be a problem with man-db. You can reproduce it with "nroff -mandoc -Tutf8 <ftm.7 | less -R"; or, at a more "raw" level that's reproducible with a build from groff.git:
GROFF_NO_SGR=1 ./test-groff -mtty-char -mandoc -Tutf8 <~/ftm.7 | less -R
Looking at the raw output, we could debate whether this is a groff(1) bug or a less(1) bug. With the backspace sequences made visible, "_both_ _BSD_SOURCE" reads as:
^Hb^Ho_^Ht_^Hh ^H_B^HBS^HSD^HD^H_S^HSO^HOU^HUR^HRC^HCE^HE
So "_^H_" is ambiguous: it could be either an underlined underline or a bolded underline. It appears that less(1) takes its cue from the earlier underlined word, and only switches into bold mode once it sees text that's unambiguously bold. You don't see this in SGR mode, which is semantically clearer; unfortunately a lot of people objected to SGR mode because it confuses some pagers, so in some places it's off by default.
I think it would be worth taking this up with the less(1) maintainer.
The remaining question (and the reason I haven't closed this bug against man-db quite yet) is exactly why you're not in SGR mode. While Debian disables this by default, I'm not actually sure that Fedora does; if so I can't find it in their git repository. Do you have GROFF_NO_SGR=1 in your environment?
|