bugGNU roff - Bugs: bug #64207, [PATCH] [mm] internal...

 
 

bug #64207: [PATCH] [mm] internal `pg@next-page` macro should invoke `br` before `ne`

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Wed 17 May 2023 09:34:13 AM UTC
   
 
Category:  Macro mm Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Jul 2023 08:52:28 AM UTC, comment #3: 


commit 9ef2a3d2f4dc9a0e715ade97d8779d1b98c974f7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed May 17 22:46:39 2023 -0500

    [mm]: Fix Savannah #64207.

    * contrib/mm/m.tmac (pg@next-page): Break the line before `ne`eding a
      large amount of space to force a page (or column) break.

    Fixes <https://savannah.gnu.org/bugs/?64207>.


G. Branden Robinson <gbranden>
Group administrator
Mon 22 May 2023 07:55:45 AM UTC, comment #2: 
G. Branden Robinson <gbranden>
Group administrator
Thu 18 May 2023 03:45:52 AM UTC, comment #1: 

Going ahead with this in my branch; there's no risk it will sneak into groff 1.23.0.

G. Branden Robinson <gbranden>
Group administrator
Wed 17 May 2023 09:34:13 AM UTC, original submission:  

Affects groff 1.22.4.

It seems to be a common error in *roff to use `ne` without `br` before it, but the behavior you get when including the `br` request is usually what people want.



$ cat EXPERIMENTS/use-ne-to-break-page.roff
.de LI
Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab
illo inventore veritatis et quasi architecto beatae vitae dicta sunt,
explicabo.
..
.LI
.ne 999i
.br
Now check this out.
.sp
.LI
Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab
illo inventore veritatis et quasi architecto beatae vitae dicta sunt,
explicabo.
.br
.ne 999i
$ nroff EXPERIMENTS/use-ne-to-break-page.roff | cat -s
Sed  ut  perspiciatis, unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam eaque  ipsa,
quae ab illo inventore veritatis et quasi architecto beatae vitae

dicta sunt, explicabo.
Now check this out.

Sed ut perspiciatis, unde omnis iste natus error  sit  voluptatem
accusantium  doloremque laudantium, totam rem aperiam eaque ipsa,
quae ab illo inventore veritatis et quasi architecto beatae vitae
dicta  sunt, explicabo.  Sed ut perspiciatis, unde omnis iste na‐
tus error sit voluptatem accusantium doloremque laudantium, totam
rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi
architecto beatae vitae dicta sunt, explicabo.


I propose a simple patch for this.


diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index c679a7089..0b2878c89 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -1297,6 +1297,7 @@ numeric; got '\\$1'
 .\" stop output and begin on next page. Fix footnotes and all that.
 .de pg@next-page
 .\".debug next-page
+.br
 .ne 999i               \" activate trap
 .\" .pg@footer
 ..


Unfortunately, `pg@next-page` has several callers and it's conceivable that some of them might exhibit changed behavior due to this.  So make this change in the 1.24 cycle and see what shakes out.

Also, with any luck we'll have the new, improved `.R` register by then and we can use that as the argument to `ne` instead of `999i`, which risks numeric overflow in the (admittedly unlikely) event that some output device shows up with a resolution so high that this value causes numeric overflow.  See bug #63587.



G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-10 gbranden StatusReady for Merge Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2023-05-22 gbranden StatusIn Progress Ready for Merge
    2023-05-18 gbranden StatusPostponed In Progress
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code