bugGNU roff - Bugs: bug #65462, [man] doesn't restore previous...

 
 

bug #65462: [man] doesn't restore previous adjustment mode after paragraph tag

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Fri 15 Mar 2024 09:03:59 PM UTC
   
 
Category:  Macro package man Severity:  4 - Important
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
   

Sat 16 Mar 2024 05:59:07 AM UTC, comment #2: 


commit bbcc04fd90cd773e9ebe6956ba44002f5a3b4324
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Mar 15 16:17:24 2024 -0500

    [man]: Fix Savannah #65462.

    * tmac/an.tmac (TP): Save the existing adjustment mode before disabling
      adjustment in the diversion used to format the paragraph tag.

      (an*TP-trap): Restore the saved adjustment mode after closing the
      diversion, instead of using the configured default adjustment mode.

    Fixes <https://savannah.gnu.org/bugs/?65462>.  Thanks to Russ Allbery
    for the report.

commit cb34b1e1970001f5fbd5454db96833fed7efe8b2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Mar 15 16:14:15 2024 -0500

    [man]: Regression-test Savannah #65462.

    * tmac/tests/an_adjustment-mode-preserved-after-paragraph-tag.sh: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.

    Test fails at this commit.


G. Branden Robinson <gbranden>
Group administrator
Fri 15 Mar 2024 09:20:15 PM UTC, comment #1: 

Regression test written and committed, fix written and committed.

Will be in my next push, likely by Monday at the latest.

Let me know if you need it sooner.

G. Branden Robinson <gbranden>
Group administrator
Fri 15 Mar 2024 09:03:59 PM UTC, original submission:  

Severity set to"Important" because it's a regression from groff 1.22.4 behavior, and consequently the fix is one distributors might want to pick up.  (Fair warning: some internal macros have been renamed since 1.23.0.)

It is, however, a rendering/cosmetics issue.

Russ Allbery reported this issue to the groff list, having heard about it from Perl users who were less gruntled than usual.

Input:


$ cat EXPERIMENTS/gruntled.man
.TH foo 1 2024-03-15 "groff test suite"
.SH Name
foo \- frobnicate a bar
.SH Description
.\" The seemingly casual text below is crafted so that one can visually
.\" verify the presence or absence of adjustment.
.\"   groff <= 1.23 defaults: BP=7n, LL=78n (BP didn't exist yet)
.\"   groff >  1.23 defaults: BP=5n, LL=80n
Let us measure our degree of gruntlement.
.P
.ad l
First, align output to the left.
A dubious practice,
to be sure,
but the house style of Perl man pages to date.
.IR pod2man (1)
might soon come to support
.I groff
1.23's
.B AD
string.
.TP
Seventh Edition Unix
had the same preference in
.I nroff
mode in 1979,
and did not adjust the text to both margins on terminals
(using a
.B na
request),
though it did when using a typesetter.
.TP
SunOS
commented out the disablement of adjustment as early as its 2.0 release
(1982),
and appears to have retained that all the way through Solaris 10.
.P
The tagged paragraphs above should retain the alignment configured in
the previous untagged paragraph
(as should this one).


groff 1.22.4 output:


$ /usr/bin/nroff -man EXPERIMENTS/gruntled.man
foo(1)                      General Commands Manual                     foo(1)



Name
       foo - frobnicate a bar

Description
       Let us measure our degree of gruntlement.

       First, align output to the left.  A dubious practice, to be sure, but
       the house style of Perl man pages to date.  pod2man(1) might soon come
       to support groff 1.23's AD string.

       Seventh Edition Unix
              had the same preference in nroff mode in 1979, and did not ad‐
              just the text to both margins on terminals (using a na request),
              though it did when using a typesetter.

       SunOS  commented out the disablement of adjustment as early as its 2.0
              release (1982), and appears to have retained that all the way
              through Solaris 10.

       The tagged paragraphs above should retain the alignment configured in
       the previous untagged paragraph (as should this one).



groff test suite                  2024‐03‐15                            foo(1)


groff 1.23.0 output:


$ ~/groff-stable/bin/nroff -man EXPERIMENTS/gruntled.man
foo(1)                      General Commands Manual                     foo(1)

Name
       foo - frobnicate a bar

Description
       Let us measure our degree of gruntlement.

       First, align output to the left.  A dubious practice, to be sure, but
       the house style of Perl man pages to date.  pod2man(1) might soon come
       to support groff 1.23’s AD string.

       Seventh Edition Unix
              had  the  same preference in nroff mode in 1979, and did not ad‐
              just the text to both margins on terminals (using a na request),
              though it did when using a typesetter.

       SunOS  commented out the disablement of adjustment as early as its  2.0
              release  (1982),  and  appears to have retained that all the way
              through Solaris 10.

       The tagged paragraphs above should retain the alignment  configured  in
       the previous untagged paragraph (as should this one).

groff test suite                  2024‐03‐15                            foo(1)


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

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-16 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2024-03-15 gbranden Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code