bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #63121] Default value for doc-volume-operating-system string in tma


From: G. Branden Robinson
Subject: [bug #63121] Default value for doc-volume-operating-system string in tmac/mdoc/doc-common
Date: Wed, 28 Sep 2022 15:19:22 -0400 (EDT)

Update of bug #63121 (project groff):

              Item Group:                    None => Incorrect behaviour    
                  Status:                    None => Fixed                  
             Assigned to:                    None => gbranden               
             Open/Closed:                    Open => Closed                 
         Planned Release:                    None => 1.23.0                 

    _______________________________________________________

Follow-up Comment #1:

Thanks for the report.

This is already fixed in groff Git and is expected in the groff 1.23 release.

Here is the commit message.  I am including a part of the associated diff that
you can perhaps employ as a patch (I don't know how well it will apply to your
system's installation).


commit f911d0075cdae4a9f940ef2cad27e53a7af01b61
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Sep 7 23:29:29 2022 -0500

    [mdoc]: Stop prefixing center header with "BSD".
    
    Stop prefixing center header with name of operating system.  This was
    hard-coded to "BSD" and stuck on all mdoc(7) pages using a default
    manual section number, regardless of host operating system.  Bad idea.
    Further, the argument to the `Os` call, if any, or a default, is always
    disclosed in the left footer, so the foregoing practice gave the reader
    no new information.  (On the other hand, header and footer rendering was
    not reliable in continuous rendering mode, the default for terminals, in
    groff 1.22.4 and earlier.  It is now.)
    
    * tmac/mdoc/doc-common: Do it.
    
      (Dt): Initialize `doc-volume` as empty and annotate it; calling the
      macro with a numeric second argument overrides the fallback default of
      "LOCAL".  A slash is no longer needed to separate a recognized
      architecture string from the OS name, so drop it.
    
    * tmac/groff_mdoc.7.man: Stop using the string in examples.  Also
      correct table format specification declaring 3 columns but using 2.
    
    * tmac/tests/doc_smoke-test.sh: Update test expectations.

diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index 3845a507e..dd936a808 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -348,7 +348,6 @@
 .
 .\" an alternative, more detailed scheme for naming the manual sections
 .\"
-.ds doc-volume-operating-system BSD
 .ds doc-volume-ds-1 General Commands Manual
 .ds doc-volume-ds-2 System Calls Manual
 .ds doc-volume-ds-3 Library Functions Manual
@@ -472,10 +471,10 @@
 .    ds doc-section \$2
 .    ie \B'\$2' \{\
 .      if ((\$2 >= 1) & (\$2 <= 9)) \{\
-.        ds doc-volume "\*[doc-volume-operating-system]
+.        ds doc-volume \" empty (not "LOCAL")
 .        if \A'\$3' \{\
 .          if d doc-volume-as-\$3 \
-.            as doc-volume "/\*[doc-volume-as-\$3]
+.            as doc-volume "\*[doc-volume-as-\$3]
 .          \}
 .        as doc-volume " \*[doc-volume-ds-\$2]
 .      \}


I was doing quite a bit of work on mdoc a couple of weeks ago, so you may well
need or want some other changes in the vicinity.

https://git.savannah.gnu.org/cgit/groff.git/log/?ofs=50
https://git.savannah.gnu.org/cgit/groff.git/log/?ofs=100

Alternatively, you might wish to run a groff built from Git source.

https://git.savannah.gnu.org/cgit/groff.git/tree/INSTALL.REPO


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63121>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]