bugGNU roff - Bugs: bug #60373, [mm] .LT SP (simple letter) not...

 
 

bug #60373: [mm] .LT SP (simple letter) not working correctly

Submitter:  Robert Goulding <rgouldin>
Submitted:  Sun 11 Apr 2021 02:40:53 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:18:18 PM UTC, comment #4: 


commit fc8603322f91d5d4ede07422d51e9ee1143bae87
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun May 30 20:47:34 2021 +1000

    Add regression tests for Savannah #60373.

    * contrib/mm/tests/LT_SP_AU_without_AT_works.sh:
    * contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh: Add tests.
    * contrib/mm/mm.am (mm_TESTS): Run tests.

    Tests fail at this commit.

commit d3ad6b14b4ceb5f542694723c98f667be6b1bc7d
Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date:   Tue Apr 13 22:17:12 2021 +0000

    Fix Savannah #60673 (1/3).

    * contrib/mm/m.tmac (let@print-head): Quote the interpolation of the
      string `let*lo-SJ`.

    Solves part of bug #60373, "[t]he subject line shows only the first
    word".

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

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

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]

commit d843db13b7b6ffbadd7678d0f71bea43a1684bf6 (HEAD -> master)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon May 31 00:59:01 2021 +1000

    [mm]: Document that LT SP doesn't give a FC.

    * contrib/mm/groff_mm.7.man (Description/Macros) <LT>: Document
      the "SP" (simplified) letter style more completely.  Salutations and
      formal closings are omitted.

    Solves the remaining part of bug #60373, "the formal closing is omitted
    completely".  And, regarding the salutation, #60390.

    Fixes <https://savannah.gnu.org/bugs/?60373> and
    <https://savannah.gnu.org/bugs/index.php?60390>.

    * contrib/mm/m.tmac (let@fc_SP): Also add a comment to this otherwise
      suspicious-looking macro definition.


G. Branden Robinson <gbranden>
Group administrator
Sun 30 May 2021 09:03:56 AM UTC, comment #3: 

Thanks for the report, Robert.

I would add that you don't need -Tpdf to see the misbehavior--it shows up just fine on the terminal too.

Your report contextualizes several of Bjarni's bug reports.

And this one of the most impressive backtraces I've yet seen.


$ ./build/test-groff -Tutf8 -b -ww -mm EXPERIMENTS/goulding-letter.mm | cat -s
troff: backtrace: file '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':364
troff: /home/branden/src/GIT/groff/build/../contrib/mm/m.tmac:364: warning: can't open macro file 'mm/locale': No such file or directory
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':3473: while loop
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':3474: macro 'let@print-head'
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':3428: macro 'let@header'
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':1263: trap-invoked macro 'pg@header'
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':470: macro 'SP'
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':459: macro 'par@doit'
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':438: macro 'P'
troff: backtrace: file 'EXPERIMENTS/goulding-letter.mm':12
troff: EXPERIMENTS/goulding-letter.mm:12: warning: macro 'let*ia-title!1' not defined
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':3296: while loop
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':3297: macro 'let*lt-sign'
troff: backtrace: '/home/branden/src/GIT/groff/build/../contrib/mm/m.tmac':3285: macro 'SG'
troff: backtrace: file 'EXPERIMENTS/goulding-letter.mm':15
troff: EXPERIMENTS/goulding-letter.mm:15: warning: macro 'let*wa-title!1' not defined


G. Branden Robinson <gbranden>
Group administrator
Thu 06 May 2021 02:58:55 PM UTC, comment #2: 

Thanks for both the patches. I've finally tried them out, and it almost works. The only thing missing is the Formal Closing, defined by the .FC macro.

Robert Goulding <rgouldin>
Wed 14 Apr 2021 12:34:15 AM UTC, comment #1: 

  The defects are addressed in bug reports #60388 to #60390.


Bjarni Ingi Gislason <bjarniig>
Sun 11 Apr 2021 02:40:53 PM UTC, original submission:  

Using groff version 1.23.0.rc1.235-633d.

Sample file:

.LT SP
.WA "John Doe"
Nowhere,
USA.
.WE
.IA "Jane Smith"
Somewhere,
UK.
.IE
.LO SJ "Letter of Introduction"
.LO SA "Dear Ms Smith"
.P
This is the text of the letter.
.FC "Yours sincerely"
.SG

Process with groff -mm -Tpdf

You'll find that: The subject line shows only the first word; the formal closing is omitted completely; and the writer's name at the bottom is followed by a trailing comma.

If you change the first line to
.LT BL

or one of the other letter types, everything is printed correctly.

Robert Goulding <rgouldin>

 

(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 (Posted a comment)
  • -email is unavailable- added by bjarniig (Posted a comment)
  • -email is unavailable- added by rgouldin (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-30 gbranden StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2021-05-30 gbranden StatusNone Confirmed
        Assigned toNone gbranden
        SummaryOne letter type (.LT SP) not working correctly in -mm [mm] .LT SP (simple letter) not working correctly

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code