bugGNU roff - Bugs: bug #57638, Regression: -me's .nm macro broken...

 
 

bug #57638: Regression: -me's .nm macro broken as of commit 2cc968c7

Submitter:  Dave <barx>
Submitted:  Mon 20 Jan 2020 02:35:22 AM UTC
   
 
Category:  Macro me 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
   

Jump to the original submission

Wed 05 Oct 2022 07:29:33 AM UTC, comment #8: 


commit 0c010b1c2394fdb16417c04907e34de47ffe63be
Author: George HELFFRICH <ghfbsd@gmail.com>
Date:   Sun Oct 11 19:08:30 2020 +1100

    [me]: Fix regression of '.nm' (#57638).

    * tmac/e.tmac-u (nm): Use saved point size and font position for line
      numbering only if those registers exist.

    Regressed in groff 1.22.4.

    Fixes <https://savannah.gnu.org/bugs/index.php?57638>.


G. Branden Robinson <gbranden>
Group administrator
Sun 11 Oct 2020 08:22:34 AM UTC, comment #7: 

Fixed in 0c010b1c2394fdb16417c04907e34de47ffe63be.

G. Branden Robinson <gbranden>
Group administrator
Mon 10 Feb 2020 09:52:39 AM UTC, comment #6: 

Again, OK

George Helffrich <georgeh>
Mon 10 Feb 2020 06:31:07 AM UTC, comment #5: 

comment #4:

> (but the markup interpretation of the underscore garbled the changed lines in comment #2).


Here are the unmolested lines (as retrieved from the emailed copy of comment #3):


-.      ps \\n[_#p]
-.      ft \\n[_#f]
+.      if r _#p .ps \\n[_#p]
+.      if r _#f .ft \\n[_#f]


Dave <barx>
Group Member
Sun 09 Feb 2020 03:28:19 PM UTC, comment #4: 

OK (but the markup interpretation of the underscore garbled the changed lines in comment #2).

George Helffrich <georgeh>
Fri 07 Feb 2020 01:27:43 AM UTC, comment #3: 


comment #2:

> G Helffrich posted a patch: http://lists.gnu.org/archive/html/bug-groff/2020-01/msg00086.html


  The provided patch uses 'd' instead of 'r' in the test.

    Add a test for the numeric registers "_#p" and "_#f"
in the macro ".nm",
before they are used.

  Changed lines:

-. ps \\n[_#p]
-. ft \\n[_#f]
+. if r #p .ps \\n[#p]
+. if r #f .ft \\n[#f]

Bjarni Ingi Gislason <bjarniig>
Fri 07 Feb 2020 12:48:52 AM UTC, comment #2: 
Dave <barx>
Group Member
Mon 20 Jan 2020 05:50:40 AM UTC, comment #1: 

(Probably irrelevant, but the output is the same whether the version of groff calling the -me package is the latest or an older (1.22.3) code base.  However, different warnings are emitted.  The warnings in comment #0 are from the latest code base.  Under groff 1.22.3, the two number-register warnings are not there, only the font-number warning.)

Dave <barx>
Group Member
Mon 20 Jan 2020 02:35:22 AM UTC, original submission:  

Commit 2cc968c7 (whose author I've added to this bug's cc list, since he may not ordinarily monitor this bug tracker) introduced a regression in the -me macro set.

It can be demonstrated with the command

printf ".nm 1 1\nHi.\n" | groff -a -me

Running this command against the version of tmac/e.tmac-u from before that commit gives the expected output:


<beginning of page>
 1 Hi.


Running it after the commit (including using the latest version of e.tmac-u) gives:


[...]/tmac/e.tmac:99: backtrace: macro 'nm'
troff: <standard input>:1: warning: number register '_#p' not defined
[...]/tmac/e.tmac:100: backtrace: macro 'nm'
troff: <standard input>:1: warning: number register '_#f' not defined
[...]/tmac/e.tmac:100: backtrace: macro 'nm'
troff: <standard input>:1: warning: bad font number
<beginning of page>
1Hi.


Dave <barx>
Group Member

 

(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 (Updated the item)
  • -email is unavailable- added by georgeh (Posted a comment)
  • -email is unavailable- added by bjarniig (Posted a comment)
  • -email is unavailable- added by barx (Submitted the item)
  • -email is unavailable- added by barx
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-11 gbranden StatusNone Fixed
        Assigned toNone gbranden
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2020-07-25 gbranden CategoryMacro - others/general Macro me
    2020-01-20 barx Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code