Okay, I think we've sorted out the way forward for groff that would
address the immediate issue.  That leaves three questions: should I do
something in the next release of Pod::Man, should I assume that the next
release of groff will default to ragged right, and is there a way for
Pod::Man output to support the intent of the AD register.

"G. Branden Robinson" <g.branden.robin...@gmail.com> writes:

> If I don't get back to you soon enough, go ahead with your initial idea.

>     .if n .ds AD l

> You'll want to keep

>>     .if n .ad l

> for the sake of non-groff formatters, of course.

I think the logic that would correctly honor the intent of AD and also
maintain backward compatibility would be something like this:

1. If groff before 1.23.0 or not-groff, add ".if n .ad l" after .TH.

2. If groff 1.23.0, add ".if n .ds AD l" before .TH.  Also having
   ".if n .ad l" after .TH would be harmless but insufficient.

3. If groff after 1.23.0... it's not clear what I should do, particularly
   since Pod::Man releases get baked into Perl core and thus have a long
   effective lifetime.  Ideally from my perspective groff would default to
   ragged right and then I should do nothing in that case, since then I
   would be honoring AD correctly.

(I don't know off-hand how to express that logic in roff, so if it does
seem warranted to go with version checks, I'll probably be asking for
assistance in writing them portably, assuming that this is even something
that groff exposes.  Or maybe there's a better proxy for the version
check, like seeing if the AD register is defined.)

There seem to be two groff development and release questions embedded in
here:

1. Do you think you'll change the long-standing groff default from full
   justification to ragged right under nroff in the an macro set for the
   next release?

2. Do you have an expected time frame for the next release, which controls
   whether it's worth bothering with the second piece of logic above.  I'd
   prefer to avoid releasing man pages that change justification partway
   through in the next stable release of Debian, but if a new release is
   coming before the next Debian stable release, it may not be worth
   embedding a fix for one specific groff version in every generated man
   page.

If the answer to 1 is no, then there are other possible questions about
how I could signal desire for a different default (maybe using some other
register, for instance) without interfering with application of AD.  Or
maybe this is overkill and Pod::Man just doesn't support AD, although in
general my development philosophy for Pod::Man is to try to converge on
normal man page practices as much as I can given that POD is a far more
limited language than roff and thus I can't represent some subtleties that
roff can.

>     We're getting close to 35 years of ".ad b" being _groff's_ default,
>     and even if I think a lot of people won't consciously notice the
>     base paragraph indentation change--instead observing that, "huh,
>     lines fit now when they didn't used to, that's nice, but
>     weird"--_everybody_ will notice a change to adjustment, and some
>     will be as loud and destructive as the author of the Worst Man Page
>     That Has Ever Existed was.  I think it virtuous to stand up to
>     brogrammers.

For what it's worth, in over 20 years of maintaining Pod::Man with this
design choice, I've never gotten a complaint about it, and multiple people
noticed when it broke.  Admittedly, the breakage is worse than always
doing full justification, since it changes in the middle of the man page
and thus looks more wrong, but my anecdotal experience is that people
quite like this "feature" of Pod::Man and the advocates for full
justification in nroff seem to be few and far between.

-- 
Russ Allbery (ea...@eyrie.org)             <https://www.eyrie.org/~eagle/>

Reply via email to