groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix for groff Git regression (Savannah #64005)


From: G. Branden Robinson
Subject: [PATCH] fix for groff Git regression (Savannah #64005)
Date: Wed, 5 Apr 2023 21:42:30 -0500

Hi folks,

At 2023-04-05T18:07:28-0500, G. Branden Robinson wrote:
> At 2023-04-05T13:04:45-0500, Dave Kemper wrote:
> > The missing page break you're seeing here is due to a combination of
> > factors:
> >  - Immediately before the .bp, you call the .DE macro
> >  - The .DE macro was recently modified to invoke the .ns request.
> >  - When no-space mode (.ns) is in effect, a .bp is ignored.  (This
> >    is long-established roff behavior.)
> > 
> > The .ns request was added to .DE to address a rendering issue with
> > multiple displays in a row.  (See
> > http://savannah.gnu.org/bugs/?62688 for the full story.)  Your case
> > appears to be an unintended side effect.
> 
> Yes, this is a full-on bug in groff Git, and it's my fault.  I've
> filed https://savannah.gnu.org/bugs/?64005 about it.
> 
> It is a regression from 1.22.4, so I will work on it right away, and
> hope to have it in place by this weekend so Bertrand can consider it
> for 1.23.0.rc4.

I've attached what I have in my working copy.  I'd appreciate reviews
for correctness.  It passes the regression test I wrote for it.

Here's a dissection of the change to s.tmac, beyond what is covered in
the ChangeLog.

1. No-space mode (register \n[.ns]) is saved.
2. No-space mode is (perhaps redundantly) cancelled.
3. Invoke the aliased `bp` request with the control character
   corresponding to our own call.
4. Invoke the aliased `bp` with the argument we were given, if any.
   N.B. \\$@ is not usable here, because it quotes arguments, and a
   formatter request, not being a macro, does not handle quotation as
   macros do.
5. Reënable no-space mode only if we were in it when called.
6. Discard the register used to save no-space mode enablement.
7. Replace all invocations of `bp` already present with invocations of
   its new alias instead, to preserve existing behavior precisely.

Feedback welcome.

Regards,
Branden

Attachment: 64005-fix.diff
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]