bugGNU roff - Bugs: bug #63527, [mdoc] .Nm duplicates parameters...

 
 

bug #63527: [mdoc] .Nm duplicates parameters from supplementary calls in "NAME" section

Submitter:  John Gardner <alhadis>
Submitted:  Wed 14 Dec 2022 11:06:18 PM UTC
   
 
Category:  Macro package mdoc 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
   

Thu 15 Dec 2022 02:15:11 AM UTC, comment #5: 


commit 4b923a92e4f5958796ea321fcf1aeddf5f914a21
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Dec 14 18:20:08 2022 -0600

    tmac/doc.tmac (Nm): Fix `if` -> `ie` typo/thinko.

    Fixes <https://savannah.gnu.org/bugs/?63527>.  Thanks to John Gardner
    for the report.


G. Branden Robinson <gbranden>
Group administrator
Thu 15 Dec 2022 12:12:10 AM UTC, comment #4: 

Ie I had a dollar for every time I got those f\*(&#g request names mixed-up… well, I could finally afford that Osmium cube I covet for some reason…

John Gardner <alhadis>
Thu 15 Dec 2022 12:04:50 AM UTC, comment #3: 

One-character typo!  Priceless.


$ git diff
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 4d72d6509..8fd662c07 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -201,6 +201,8 @@
 .
 .\" NS doc-arg-count global register
 .\" NS   total number of arguments
+.\" XXX: This register name and description aren't quite right, but its
+.\" old name `doc-arg-limit` doesn't seem accurate either.  Demystify.
 .
 .nr doc-arg-count 0
 .
@@ -1085,7 +1087,7 @@
 .    ie \n[.$] \{\
 .      \" Handle '.Nm ...' in "Name" section: don't use a special font.
 .      ie \n[doc-in-name-section] \{\
-.        ie "\*[doc-topic-name]"" \
+.        if "\*[doc-topic-name]"" \
 .          ds doc-topic-name "\$1\"
 .        No \$@
 .      \}


G. Branden Robinson <gbranden>
Group administrator
Wed 14 Dec 2022 11:34:40 PM UTC, comment #2: 

The font changes suggest that this was an oversight in my fix for bug #63377. ...which you also reported.  Thanks for the QA!

G. Branden Robinson <gbranden>
Group administrator
Wed 14 Dec 2022 11:28:55 PM UTC, comment #1: 

Yup, I see it.  Thanks for the report.  I'll get on this.

G. Branden Robinson <gbranden>
Group administrator
Wed 14 Dec 2022 11:06:18 PM UTC, original submission:  

Using the latest build of Groff (94746cbd4), I'm seeing duplicate output in man pages whose "NAME" sections contain multiple calls to .Nm:

NAME
       foo, baz, baz, qux qux — program description

DESCRIPTION
       This is a test of foo, baz and qux.


Other sections are unaffected, as is the initial call to .Nm that populates \*[doc-topic-name].

To reproduce:

.Dd December 15, 2022
.Dt FOO 1
.Os
.Sh NAME
.Nm foo ,
.Nm baz ,
.Nm qux
.Nd program description
.Sh DESCRIPTION
This is a test of
.Nm foo ,
.Nm baz
and
.Nm qux .


I also have an mdoc.local file linked to my site-tmac directory, but removing it has no bearing on the result.

John Gardner <alhadis>

 

(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 (Posted a comment)
  • -email is unavailable- added by alhadis (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-12-15 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2022-12-15 gbranden StatusConfirmed In Progress
        Planned ReleaseNone 1.23.0
    2022-12-14 gbranden StatusNone Confirmed
        Assigned toNone gbranden
        Summary[mdoc] .Nm duplicates optional parameter in &quot;NAME&quot; section [mdoc] .Nm duplicates parameters from supplementary calls in "NAME" section

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code