bugGNU roff - Bugs: bug #55789, [PATCH] [mdoc] want .St -susv1 and...

 
 

bug #55789: [PATCH] [mdoc] want .St -susv1 and -susv4

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Wed 27 Feb 2019 03:00:10 AM UTC
   
 
Category:  Macro mdoc Severity:  2 - Minor
Item Group:  Feature change Status:  Fixed
Privacy:  Public Assigned to:  schwarze
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 01 Apr 2023 02:27:27 PM UTC, comment #8: 


commit 8d40f7574164ee6a7fb240755c6ad65c07fb2985
Author: Ingo Schwarze <schwarze@openbsd.org>
Date:   Thu Jan 13 09:05:22 2022 +0100

    Support the -susv1 and -susv4 arguments to the mdoc(7) .St macro.

    While i hate adding more aliases for names of standards,
    deleting -susv2 is not an option because a considerable number of
    FreeBSD manual pages use it.  Supporting -susv2 and -susv3 but not
    supporting -susv1 (the original standard) and -susv4 (the current
    standard) is just weird.  Besides, both -susv3 and -susv4 are used
    in some FreeBSD manual pages, too.
    I'm not adding -xsh4.2 though because no real-world manual pages
    use that one; please simply use -xpg4.2 instead.

    Too minor to mention in the ChangeLog.
    Part of an old diff from Bjarni Ingi Gislason.
    OK gbranden@.
    Closes https://savannah.gnu.org/bugs/?55789.


G. Branden Robinson <gbranden>
Group administrator
Thu 13 Jan 2022 08:52:09 AM UTC, comment #7: 

Fixed in 8d40f7574164ee6a7fb240755c6ad65c07fb2985.

Groff and mandoc are now in sync in this respect:
https://inbox.vuxu.org/mandoc-source/336401daa4569d8f@mandoc.bsd.lv/

Both now have -suv1 and -susv4, and -xsh4.2 is gone.

Ingo Schwarze <schwarze>
Group Member
Tue 11 Jan 2022 11:10:05 PM UTC, comment #6: 

comment #5:

> Are people ignoring my comment #1 for some unstated reason and posting patches adding the spurious -xsh4.2 anyway?


Not recently, I don't think--I'm just trying to clean up the bug list a bit.  The patch itself is almost 2 years old.
 

> My preference would be to add -susv1 and -susv4 but to delete -xsh4.2, but i would appreciate a second opinion before doing that.


I can't remember ever seeing a reference to XSH4.2, though a Google Search does turn up hits from relevant sources.  If I have, it's been vanishingly rare compared to SUS and the Issues of POSIX released by the Open Group.

So I'm willing to second it.  We can always add XSH4.2 later if, somehow, the torches and pitchforks get too close.
 

> I do see value in minimizing the size of the API, which also helps keeping documentation shorter.


Agreed.

G. Branden Robinson <gbranden>
Group administrator
Tue 11 Jan 2022 10:45:47 PM UTC, comment #5: 

Are people ignoring my comment #1 for some unstated reason and posting patches adding the spurious -xsh4.2 anyway?

My preference would be to add -susv1 and -susv4 but to delete -xsh4.2, but i would appreciate a second opinion before doing that.

I do see value in minimizing the size of the API, which also helps keeping documentation shorter.

Ingo Schwarze <schwarze>
Group Member
Tue 11 Jan 2022 10:22:46 AM UTC, comment #4: 

Bjarni sent a follow-up patch for the groff_mdoc(1) man page that really should have been added as a comment to this ticket.  I'll be closing the other ticket as a duplicate.


From 244bc0c1f78b8523ae02cfeaf8f91f668e939320 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sat, 1 Feb 2020 23:10:34 +0000
Subject: [PATCH] tmac/groff_mdoc.7.man: Define some standard abbreviations

  Add missing definitions of some standard abbreviations.

  See groff bug #55789.

  Patch also in the attachment.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 tmac/groff_mdoc.7.man | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index 7bc2c619..e8624898 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -2134,10 +2134,14 @@ Part 2: Shell and Utilities
 X/Open
 .Pp
 .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent
+.It Li \-susv1
+.St -susv1
 .It Li \-susv2
 .St -susv2
 .It Li \-susv3
 .St -susv3
+.It Li \-susv4
+.St -susv4
 .It Li \-svid4
 .St -svid4
 .It Li \-xbd5
@@ -2156,6 +2160,8 @@ X/Open
 .St -xpg4
 .It Li \-xpg4.2
 .St -xpg4.2
+.It Li \-xsh4.2
+.St -xsh4.2
 .It Li \-xsh5
 .St -xsh5
 .El
--
2.24.1


G. Branden Robinson <gbranden>
Group administrator
Sun 02 Feb 2020 09:21:50 PM UTC, comment #3: 

  I forgot to put the patch in the attachment.
  The line numbers are (could be) different from the master copy.


(file #48335)

Bjarni Ingi Gislason <bjarniig>
Sat 01 Feb 2020 10:58:13 PM UTC, comment #2: 



  Following is still used in "mdoc.7" from "mandoc-1.14.5" (10th March 2019)

Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

<mdoc.7>: mdoc warning: .St: Unknown standard abbreviation '-susv1' (#2402)
              Please refer to the groff_mdoc(7) manpage for a
              list of available standard abbreviations.
<mdoc.7>: mdoc warning: .St: Unknown standard abbreviation '-xsh4.2' (#2411)
              Please refer to the groff_mdoc(7) manpage for a
              list of available standard abbreviations.
<mdoc.7>: mdoc warning: .St: Unknown standard abbreviation '-susv4' (#2473)
              Please refer to the groff_mdoc(7) manpage for a
              list of available standard abbreviations.

  These strings are defined in "st.c" and only used in "mdoc.7".

  The simplest fix is to define them where the other strings are
(tmac/doc-syms-u):

From 187d702f3cb7193228194c94aa3a4c944846b2b5 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sat, 1 Feb 2020 22:32:29 +0000
Subject: [PATCH] doc-syms-u: Add definitions of some standard abbreviations

  Add the following definition for "susv1", "susv4", and "xsh4.2"

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 tmac/doc-syms-u | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tmac/doc-syms-u b/tmac/doc-syms-u
index 7113f722..b86011cf 100644
--- a/tmac/doc-syms-u
+++ b/tmac/doc-syms-u
@@ -662,10 +662,14 @@
 .as doc-str-St--iso9945-2-93   " (\*[Lq]\)\*[Px]\*[doc-str-St].2\*[Rq])
 .
 .\" X/Open
+.ds doc-str-St--susv1          Version\~1 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
+.as doc-str-St--susv1          " (\*[Lq]\*[doc-Tn-font-size]SUSv1\*[doc-str-St]\*[Rq])
 .ds doc-str-St--susv2          Version\~2 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
 .as doc-str-St--susv2          " (\*[Lq]\*[doc-Tn-font-size]SUSv2\*[doc-str-St]\*[Rq])
 .ds doc-str-St--susv3          Version\~3 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
 .as doc-str-St--susv3          " (\*[Lq]\*[doc-Tn-font-size]SUSv3\*[doc-str-St]\*[Rq])
+.ds doc-str-St--susv4          Version\~4 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
+.as doc-str-St--susv4          " (\*[Lq]\*[doc-Tn-font-size]SUSv4\*[doc-str-St]\*[Rq])
 .ds doc-str-St--svid4          System\~V Interface Definition, Fourth Edition
 .as doc-str-St--svid4          " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq])
 .ds doc-str-St--xbd5           \*[doc-Tn-font-size]X/Open\*[doc-str-St] Base Definitions Issue\~5
@@ -684,6 +688,8 @@
 .as doc-str-St--xpg4           " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^4\*[Rq])
 .ds doc-str-St--xpg4.2         \*[doc-Tn-font-size]X/Open\*[doc-str-St] Portability Guide Issue\~4, Version\~2
 .as doc-str-St--xpg4.2         " (\*[Lq]\*[doc-Tn-font-size]XPG\*[doc-str-St]\^4.2\*[Rq])
+.ds doc-str-St--xsh4.2         \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interfaces and Headers Issue\~4.2
+.as doc-str-St--xsh4.2         " (\*[Lq]\*[doc-Tn-font-size]XSH\*[doc-str-St]\^4.2\*[Rq])
 .ds doc-str-St--xsh5           \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interfaces and Headers Issue\~5
 .as doc-str-St--xsh5           " (\*[Lq]\*[doc-Tn-font-size]XSH\*[doc-str-St]\^5\*[Rq])
 .
--
2.24.1


Bjarni Ingi Gislason <bjarniig>
Wed 27 Feb 2019 01:04:13 PM UTC, comment #1: 

1) -xsh4.2 is unused in FreeBSD-12.0, NetBSD-8.0, OpenBSD-6.4, and in the Linux man pages project.  It is an alias for a part of an ancient standard that is no longer important.  I should remove it from mandoc rather than having it added to groff.

2) -susv1 is also unused in all four systems.  But given that the original Single UNIX Specification is of considerable historical importance, that the alias -xpg4.2 is widely used, and that the newer versions -susv2 and -susv3 also see some limited use, adding it to groff for completeness may be better than deleting it from mandoc.

3) -susv4 is used in a handful of pages in FreeBSD-12.0.  Using the alias -p1003.1-2008 would probably be better, but i guess breaking those pages would be gratuitious, and besides, -susv4 is the current version of the standard, so i think adding the alias is OK.

If somebody confirms in a comment that adding -susv1 and -susv4 and deleting -xsh4.2 is a reasonable plan, i'll write and push a diff doing that.  Of course, it's an extremely low-priority issue...

Ingo Schwarze <schwarze>
Group Member
Wed 27 Feb 2019 03:00:10 AM UTC, original submission:  



  The manual "mdoc.7" from the "mandoc" (Debian
"[mdocml_1.14.4.orig.tar.gz]") package shows, that some abbreviations
are missing in the "groff" file "tmac/doc-syms-u":

  Command "nroff -ww -mandoc mdoc.7 > /dev/null" :

mdoc warning: .St: Unknown standard abbreviation '-susv1' (#2527)
              Please refer to the groff_mdoc(7) manpage for a
              list of available standard abbreviations.
mdoc warning: .St: Unknown standard abbreviation '-xsh4.2' (#2536)
              Please refer to the groff_mdoc(7) manpage for a
              list of available standard abbreviations.
mdoc warning: .St: Unknown standard abbreviation '-susv4' (#2598)
              Please refer to the groff_mdoc(7) manpage for a
              list of available standard abbreviations.


Bjarni Ingi Gislason <bjarniig>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #48335:  groff.bug added by bjarniig (2KiB - application/octet-stream)

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-01 gbranden Planned ReleaseNone 1.23.0
    2022-01-13 schwarze StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Summary[PATCH] [mdoc] want more abbreviations [PATCH] [mdoc] want .St -susv1 and -susv4
    2022-01-11 gbranden Summary[PATCH] tmac/doc-syms-u: Some abbreviations are missing. [PATCH] [mdoc] want more abbreviations
    2022-01-11 gbranden Item GroupWarning/Suspicious behaviour Feature change
    2020-10-13 barx Carbon-CopyRemoved 93119 -
    2020-10-13 barx Summarytmac/doc-syms-u: Some abbreviations are missing. [PATCH] tmac/doc-syms-u: Some abbreviations are missing.
    2020-02-02 bjarniig Attached File- Added groff.bug, #48335
    2019-02-27 schwarze Severity3 - Normal 2 - Minor
        StatusNone Confirmed
        Assigned toNone schwarze

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code