On Sat, Jul 22, 2023 at 01:10:23PM +0000, Bjarni Ingi Gislason wrote: > In my ".manpath" for "nroff" was: > > DEFINE nroff test-nroff -b -ww -mandoc -rF=0 -P-i -rHY=0 -dAD=l > -rCHECKSTYLE=0 -rLL=90m > > Changing the line length with, say "export MANWIDTH=80", had no effect.
I believe this can be fixed as follows: diff --git a/src/man.c b/src/man.c index 70d0dc7a..68515eed 100644 --- a/src/man.c +++ b/src/man.c @@ -685,8 +685,7 @@ static int get_roff_line_length (void) { int line_length = cat_width ? cat_width : get_line_length (); - /* groff >= 1.18 defaults to 78. */ - if ((!troff || ditroff) && line_length != 80) { + if (!troff || ditroff) { int length = line_length * 39 / 40; if (length > line_length - 2) return line_length - 2; This may be the right thing to do. However, it will mean that the -rLL in your ~/.manpath is always overridden, so I don't understand why you're going to the effort of specifying it explicitly in the first place if you want it to be overridden. Can you explain why you're doing this? > N.B. Including multiple semi-related issues in a single bug report should be deprecated (it makes bug tracking significantly more annoying), and my practice is typically to disregard things that aren't the main subject of the bug report unless they really are trivial to fix; I have too much to do to pick up on every passing comment. If you think something is important enough to mention, then it's probably important enough to justify its own bug report. However, just a few quick notes: > Most(?) tests (searches) are a waste, as the option '-l' is used. There's no actual searching going on here. It's basically all just generic setup. > The search for "andoc" should start with "andoc.tmac". No, because what you're seeing here seems to be the effect of something like SYSTEM=andoc (or equivalent - I'd suggest that perhaps you might have an alias for "man" that adds the "-mandoc" option, except that you've said that you're calling /usr/bin/man explicitly which would presumably bypass any such alias). That feature does _not_ mean the same thing as the -m option in *roff, and it's unrelated to reading .tmac files. I don't know why you would be setting that variable if you aren't intending to use the rather obscure feature of reading manual pages from other installed operating systems. If that's not what you want, then I suggest not asking man(1) for it. > "man -l ..." : "bash-completion" is not active. Improving bash-completion for man(1) should definitely be a separate bug report, not least because right now the completion for man(1) is not handled by the man-db package at all (though perhaps it should be). I won't deal with it further in this bug report. > Do not use "atoi" (atoi(3)). While I agree that functions with better error handling are generally better, in context I don't consider these particular uses important enough to be worth spending time on. If you think they are, I'm happy to review patches. Thanks, -- Colin Watson (he/him) [cjwat...@debian.org]