bugGNU roff - Bugs: bug #63957, [mdoc] Synopsis section should not...

 
 

bug #63957: [mdoc] Synopsis section should not be adjusted (nor hyphenated)

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Fri 24 Mar 2023 07:26:25 AM UTC
   
 
Category:  Macro package mdoc Severity:  3 - Normal
Item Group:  Rendering/Cosmetics 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 09:01:25 AM UTC, comment #3: 

Fixed and regression-tested.


commit 7c15eda0d4ad89dbe5d19b01cf55c86604f39938
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Mar 24 03:24:54 2023 -0500

    [mdoc]: Fix Savannah #63957.

    * tmac/mdoc/doc-common (Sh): Restore hyphenation configured with `HY`
      register upon entry to any new section.  Disable adjustment and
      hyphenation when in the "Synopsis" section.

    Fixes <https://savannah.gnu.org/bugs/?63957>.  Thanks to Alex Colomar
    for reporting an issue that brought this one to light.

commit 7ae1742b1c72e006443ce43df00d49ae2cf6c458
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Mar 24 03:17:41 2023 -0500

    [mdoc]: Regression-test Savannah #63957.

    * tmac/tests/doc_synopsis_is_not_adjusted.sh: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.

    Test fails at this commit.


G. Branden Robinson <gbranden>
Group administrator
Fri 07 Apr 2023 04:40:38 PM UTC, comment #2: 


commit 924aa5463acd06e66c8fc8370afc2cd6833d043e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Mar 24 03:24:54 2023 -0500

    [mdoc]: Fix Savannah #63957.

    * tmac/mdoc/doc-common (Sh): Restore hyphenation configured with `HY`
      register upon entry to any new section.  Disable adjustment and
      hyphenation when in the "Synopsis" section.

    Fixes <https://savannah.gnu.org/bugs/?63957>.  Thanks to Alex Colomar
    for reporting an issue that brought this one to light.

commit 05b1de06af7c51fe036a6c3370e0ce8996a4501b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Mar 24 03:17:41 2023 -0500

    [mdoc]: Regression-test Savannah #63957.

    * tmac/tests/doc_synopsis_is_not_adjusted.sh: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.

    Test fails at this commit.


G. Branden Robinson <gbranden>
Group administrator
Thu 30 Mar 2023 10:47:05 AM UTC, comment #1: 

From my pending commit (in my working copy, not yet pushed):


diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index 53a25659f..d37b4c001 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -1410,6 +1410,7 @@
 .    doc-parse-args \$@
 .
 .    ad \*[AD]
+.    hy \n[HY]
 .
 .    ie "\*[doc-sec-head]"\*[doc-section-name]" \{\
 .      doc-set-up-titles
@@ -1424,8 +1425,8 @@
 .      nr doc-in-authors-section 0
 .
 .      ie        "\*[doc-sec-head]"\*[doc-section-synopsis]" \{\
-.        if t \
-.          na
+.        na
+.        nh
 .        nr doc-in-synopsis-section 1
 .        nr doc-indent-synopsis 0
 .        nr doc-indent-synopsis-active 0


G. Branden Robinson <gbranden>
Group administrator
Fri 24 Mar 2023 07:26:25 AM UTC, original submission:  

This is a cosmetic regression from groff 1.22.4.

Input:


.Dd June 6, 1944
.Dt timerdday 3bsd
.Os
.Sh Name
.Nm timerdday
.Nd compute time of launch operation within window
.Sh Synopsis
.Ft void
.Fn timerdday "\%struct-timespec *earliest" \
"\%struct-timespec *latest" "\%struct-timespec *resolution"
.Sh Description
Compute the optimal start time for a desired event to occur between
times
.Va earliest No and Va latest
to within a granularity of
.Va resolution .


groff 1.22.4 output:


$ groff -mandoc -Tascii ATTIC/timerdday.mdoc | cat -s
mdoc warning: Empty input line #34

Name
     timerdday -- compute time of launch operation within window

Synopsis
     void timerdday(struct-timespec *earliest, struct-timespec *latest,
     struct-timespec *resolution)

Description
     Compute the optimal start time for a desired event to occur between times
     earliest and latest to within a granularity of resolution.


(Yes, "cat -s" is necessary; yes, headers and footers are missing; and yes, groff 1.22.4 mdoc really does produce that empty line diagnostic.)

groff Git HEAD output:


$ ./build/test-groff -mandoc -Tascii ATTIC/timerdday.mdoc | cat -s
timerdday(3bsd)                      LOCAL                     timerdday(3bsd)

Name
       timerdday -- compute time of launch operation within window

Synopsis
       void
       timerdday(struct-timespec     *earliest,    struct-timespec    *latest,
           struct-timespec *resolution);

Description
       Compute the optimal start time for a desired  event  to  occur  between
       times earliest and latest to within a granularity of resolution.

GNU                              June 6, 1944                  timerdday(3bsd)


So, a big improvement except for the giant gaps in the function prototype.

Reported by Alex Colomar to the groff discussion list.

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)
  • -email is unavailable- added by gbranden (original reporter)
  •  

    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 5 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-04-07 gbranden StatusIn Progress Ready for Merge
    2023-03-24 gbranden Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code