bugGNU roff - Bugs: bug #53834, an-old.tmac: Macro "IR",...

 
 

bug #53834: an-old.tmac: Macro "IR", conserve space at the beginning of an argument

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Fri 04 May 2018 03:56:55 PM UTC
   
 
Category:  Macro man Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Invalid
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 18 May 2021 03:16:21 AM UTC, comment #7: 

Hi Bjarni,

Pardon me--my comment #6 should have gone to bug #53541, which seems almost hopelessly entangled with this one.

There are multiple sources of confusion here.  In Savannah "patch #53541" is not the same thing as "bug #53541".  There can be zero or more files ("patches") attached to a bug, and their quantities are of the same order which increases the chance of confusing their name spaces.

Additionally, I think you may have been reporting a bug arising from your local modifications of tmac/an-old.tmac.  (We've seen this sort of thing in your reports before.)  I suggest this because I ran across an issue that sounds suspiciously like the same one while working on bug #53541.

Briefly, I had the following comment in the an-old.tmac file:


.\"   (4) Prefix the string argument to an 'as' request with a double
.\"       quote (") if it begins with a macro argument interpolation
.\"       (which might start with a space).  (This would apply to 'ds'
.\"       as well but for item (3) above.)


It is now unnecessary due a subsequent refactor.

Since I suspect that is the problem that prompted this report, I am closing this ticket as invalid because it never applied to groff 1.22.3 or any snapshot of groff's master branch in Git since then.

G. Branden Robinson <gbranden>
Group administrator
Tue 18 May 2021 02:03:34 AM UTC, comment #6: 

I've figured out what I needed to know.  I'm implementing my own solution.

G. Branden Robinson <gbranden>
Group administrator
Fri 12 Oct 2018 09:29:24 PM UTC, comment #5: 


  I see it between bug 53413 and 53547.  It is dated 2018-04-01.


Bjarni Ingi Gislason <bjarniig>
Wed 10 Oct 2018 02:21:49 AM UTC, comment #4: 

Bug #53541 has gone missing from the Savannah bug tracker. :(

Here it is in the archives of the bug-groff list.

https://lists.gnu.org/archive/html/bug-groff/2018-04/msg00000.html

Did this happen because one of the maintainers marked your bug as spam?

If so, that was quite a destructive action. :(

G. Branden Robinson <gbranden>
Group administrator
Sun 17 Jun 2018 06:44:56 PM UTC, comment #3: 

  My patch is a correction of patch #53541.

  The error can't be reproduced because the argument in the last ".as"-line is protected by '\/' (which I removed in the first patch) or now by '\&'.

  Patch #53541 fixed a bug for odd numbers of arguments.  The right italic correction was not applied in this case.

Bjarni Ingi Gislason <bjarniig>
Sun 17 Jun 2018 01:23:41 PM UTC, comment #2: 

In fact the line numbers are off and the IR macro appears to be adding italic corrections where your copy of an-old.tmac is not.


527 .de1 IR
528 .  if \\n[.$] \{\
529 .    ds an-result \&\f[I]\,\\$1\f[R]\"
530 .    shift
531 .    while (\\n[.$] >= 2) \{\
532 .      as an-result \/\\$1\f[I]\,\\$2\f[R]\"
533 .      shift 2
534 .    \}
535 .    if \\n[.$] .as an-result \/\\$1\"
536 \\*[an-result]
537 .    ft R
538 .  \}
539 ..


G. Branden Robinson <gbranden>
Group administrator
Sun 17 Jun 2018 01:18:04 PM UTC, comment #1: 

Hi Bjarni,

I cannot reproduce the erroneous output you're getting with current groff git.  See attachment.

Please check the version you're using?


G. Branden Robinson <gbranden>
Group administrator
Fri 04 May 2018 03:56:55 PM UTC, original submission:  


From 823f05d4c3e244bc39c9e0f456bb11da4b208f4b Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Fri, 4 May 2018 15:32:35 +0000
Subject: [PATCH] an-old.tmac: Macro "IR", conserve space at the
 beginning of an argument

  The protection of a space, that is the first character of a roman
argument, is missing

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---

  A test example:

.TH testman 1 "2018-MM-DD"
.SH NAME
testman \(en test IR
.pl 20
.PP
.IR italic " roman"

  result is:

testman(1)                  General Commands Manual                 testman(1)

NAME
       testman - test IR

       italicroman

                                  2018-MM-DD                        testman(1)
###

 tmac/an-old.tmac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index b99dc2ce..71da9c96 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -546,10 +546,10 @@
 .    ds an-result \&\f[I]\,\\$1\f[R]\/\"
 .    shift
 .    while (\\n[.$] >= 2) \{\
-.      as an-result \\$1\f[I]\,\\$2\f[R]\/\\*[an-empty]\"
+.      as an-result \&\\$1\f[I]\,\\$2\f[R]\/\\*[an-empty]\"
 .      shift 2
 .    \}
-.    if \\n[.$] .as an-result \\$1\"
+.    if \\n[.$] .as an-result \&\\$1\"
 \\*[an-result]
 .    ft R
 .  \}
--
2.17.0


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 #44382:  53834.png added by gbranden (29KiB - image/png)

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-10 gbranden Summary[PATCH] an-old.tmac: Macro &quot;IR&quot;, conserve space at the beginning of an argument an-old.tmac: Macro "IR", conserve space at the beginning of an argument
    2021-05-18 gbranden StatusIn Progress Invalid
        Open/ClosedOpen Closed
    2021-05-18 gbranden StatusNeed Info In Progress
    2018-06-17 gbranden Attached File- Added 53834.png, #44382
        StatusNone Need Info
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code