bugGNU roff - Bugs: bug #60389, [PATCH] contrib/mm/m.tmac: omit a...

 
 

bug #60389: [PATCH] contrib/mm/m.tmac: omit a comma, if macro "let@sg_SP" is called with one argument

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Tue 13 Apr 2021 11:03:32 PM UTC
   
 
Category:  Macro mm 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
   

Sun 30 May 2021 03:21:15 PM UTC, comment #3: 


commit aac2e49db9237f31d362b5cb5c79a023a4accc20
Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date:   Tue May 25 20:02:02 2021 +0000

    Fix Savannah #60373 (2/3).

    * contrib/mm/m.tmac (let@sg_SP): Stop placing a comma after the
      first argument (an author name set by AU) if the second argument is
      empty (an author title set by AT).

    Solves another part of bug #60373, "the writer's name at the bottom is
    followed by a trailing comma".

    Fixes <https://savannah.gnu.org/bugs/?60389>.

    [Patch restyled to fit the conventions of the source file. --GBR]


G. Branden Robinson <gbranden>
Group administrator
Tue 25 May 2021 08:02:02 PM UTC, comment #2: 

  A backslash (reverse solidus) is missing after '\{'

 .ie '\\$2'' \{\
 .  misc@toupper "\\$1"
 .\}
-.el \{
+.el \{\
 .  misc@toupper "\\$1, \\$2"
 .\}
 .if \\$4 .sp
(


Bjarni Ingi Gislason <bjarniig>
Wed 14 Apr 2021 12:55:04 AM UTC, comment #1: 

  The patch is wrong as "let@sg_SP" gets a least two arguments (both
quoted).

  So the size of the second argument must be tested.


diff -dpru --unidirectional-new-file groff/contrib/mm/m.tmac new-groff/contrib/mm/m.tmac
--- groff/contrib/mm/m.tmac        2021-04-13 23:59:34.000000000 +0000
+++ new-groff/contrib/mm/m.tmac        2021-04-14 00:03:14.000000000 +0000
@@ -3428,7 +3428,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[
 .nf
 .if \\$3=1 .sp
 .sp
-.misc@toupper "\\$1, \\$2"
+.ie '\\$2'' \{\
+.  misc@toupper "\\$1"
+.\}
+.el \{
+.  misc@toupper "\\$1, \\$2"
+.\}
 .if \\$4 .sp
 .if \w'\\$5'&\\$4 \\$5
 .fi


Bjarni Ingi Gislason <bjarniig>
Tue 13 Apr 2021 11:03:32 PM UTC, original submission:  

From a9538e1a7089f243dfd5ca9da220577c4f8e5354 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Tue, 13 Apr 2021 22:59:59 +0000
Subject: [PATCH] contrib/mm/m.tmac: omit a comma, if macro "let@sg_SP" is
 called with one argument

  This fixes a part of bug #60373, "and the writer's name at the
bottom is followed by a trailing comma."

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

diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index bc9dcddf..40a5f6a4 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3428,7 +3428,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
 .nf
 .if \\$3=1 .sp
 .sp
-.misc@toupper "\\$1, \\$2"
+.ie \\n[.$]=1 \{\
+.  misc@toupper "\\$1"
+.\}
+.el \{\
+.  misc@toupper "\\$1, \\$2"
+.\}
 .if \\$4 .sp
 .if \w'\\$5'&\\$4 \\$5
 .fi
--
2.30.2


Bjarni Ingi Gislason <bjarniig>

 

(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 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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-30 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2021-05-30 gbranden StatusNone In Progress
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code