bugGNU roff - Bugs: bug #59106, [andoc] doesn't flush output at...

 
 

bug #59106: [andoc] doesn't flush output at end of each file

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Sun 13 Sep 2020 04:26:43 AM UTC
   
 
Category:  Macro - others/general Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 05 Oct 2022 07:25:14 AM UTC, comment #4: 


commit 37b4180a27a6eeaea429e40ec278abefcda7f3a7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Oct 11 17:49:08 2020 +1100

    tmac/andoc.tmac: Fix Savannah #59106.

    * tmac/andoc.tmac: When switching between macro packages in
      andoc and using continuous-rendering mode, flush any partially
      collected output line and write page footer.

      (reload-doc): Call an-end if it is defined.

      (reload-man): Call doc-end-macro if it is defined.

    Fixes <https://savannah.gnu.org/bugs/index.php?59106>.


G. Branden Robinson <gbranden>
Group administrator
Sun 11 Oct 2020 08:25:34 AM UTC, comment #3: 

Fixed in 37b4180a27a6eeaea429e40ec278abefcda7f3a7.

G. Branden Robinson <gbranden>
Group administrator
Sun 11 Oct 2020 03:03:06 AM UTC, comment #2: 

Turns out man has the same problem when transitioning to an mdoc document.

G. Branden Robinson <gbranden>
Group administrator
Thu 08 Oct 2020 12:17:50 PM UTC, comment #1: 

Still fighting with this one.

At this point I think it's because mdoc has no counterpart for man's an-p-footer.

G. Branden Robinson <gbranden>
Group administrator
Sun 13 Sep 2020 04:26:43 AM UTC, original submission:  

See attached reproducer script.

N.B., 'end-of-file' is not the same thing as 'end-of-input'.  The end macro set with .em in mdoc works fine.  It's "interstital" pages that are the problem.

Output of reproducer script follows.


mdoc-test(7)         BSD Miscellaneous Information Manual         mdoc-test(7)

NAME
     mdoc-test -- a correctness test for groff's mdoc implementation

Description
     When rendering multiple man page documents, a partially-collected line at
     the end of an mdoc(7) page would not be flushed before rendering the next
     page, omitting that line and the page footer from the output.  The next
     man page would emit the partially-collected line from the previous page
     between its header and summary.

mdoc-test(7)         BSD Miscellaneous Information Manual         mdoc-test(7)

     This is a short line.

NAME
     mdoc-test -- a correctness test for groff's mdoc implementation

Description
     When rendering multiple man page documents, a partially-collected line at
     the end of an mdoc(7) page would not be flushed before rendering the next
     page, omitting that line and the page footer from the output.  The next
     man page would emit the partially-collected line from the previous page
     between its header and summary.

     This is a short line.

BSD                           September 11, 2020                           BSD


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:
   

Attached Files
file #49792:  doc-flush-on-new-man-page.sh added by gbranden (2KiB - application/x-shellscript)

 

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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-05 gbranden CategoryMacro mdoc Macro - others/general
        Summarymdoc: doesn't flush output at end of each file [andoc] doesn't flush output at end of each file
    2020-10-11 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2020-10-11 gbranden StatusNeed Info In Progress
        Assigned toNone gbranden
    2020-09-13 gbranden Attached File- Added doc-flush-on-new-man-page.sh, #49792

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code