bugGNU roff - Bugs: bug #52983, troffrc: define register 'F' to...

 
 

bug #52983: troffrc: define register 'F' to avoid warnings from pod2man-generated documents

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Sat 27 Jan 2018 12:25:51 AM UTC
   
 
Category:  Core Severity:  1 - Wish
Item Group:  Feature change Status:  Rejected
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 30 Mar 2023 04:59:05 PM UTC, comment #3: 

Dropping patch annotation from rejected ticket.

This issue seems a duplicate of bug #52983.

I observe that it is even more wrong to unconditionally define a register named 'F' for all *roff documents than it is to do so for all documents using the man(7) macro package.

Also, troffrc is read before the input files (but after any macro packages specified with the '-m' command-line option), so this patch was logically incorrect as well.

G. Branden Robinson <gbranden>
Group administrator
Wed 21 Oct 2020 08:25:49 AM UTC, comment #2: 

I agree with Ingo.  If people don't want undefined register or macro warnings, they need to check them before using them, guarantee that they're defined first, or shut the warnings off.

G. Branden Robinson <gbranden>
Group administrator
Fri 16 Feb 2018 11:30:36 PM UTC, comment #1: 

This should be rejected.  The purpose of the file troffrc is to provide a place for site-specific configurations, and it is already too long as it stands and should probably be cleaned up.  We certained shouldn't dump random code into it.

Besides, if you consider using an undefined register a bug, then that's a bug in pod2man(1), not in groff.  Pod::Man 4.07 actually generates code which, according to a comment in the generated code, intends to avoid the warning:

  .\" Avoid warning from groff about undefined register 'F'.
  .if !\nF .nr F 0

Arguably, it might be better for pod2man(1) to write

  .if !rF .nr F 0

instead, but i don't know whether that might be less portable.  Anyway, that's not for groff to decide.

Ingo Schwarze <schwarze>
Group Member
Sat 27 Jan 2018 12:25:51 AM UTC, original submission:  


From 513f830b2efb94e16bf9c7501f4a5c949f2d076d Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sat, 27 Jan 2018 00:20:05 +0000
Subject: [PATCH] troffrc: Define register 'F' to avoid warnings

  It is used in the prologue of man pages created by "pod2man" (file
"Man.pm").

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

diff --git a/tmac/troffrc b/tmac/troffrc
index 8f8e1832..07bf7f01 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -58,6 +58,13 @@ hyphenation of the words used to generate it.
 .do mso pspic.tmac
 .do mso pdfpic.tmac
 .
+.ig
+  Avoid warnings if the register F is undefined.
+  It is used in the prologue of man pages created by "pod2man" (file
+"Man.pm").
+..
+.if !rF .nr F 0
+.
 .\" ====================================================================
 .\" Editor settings
 .\" ====================================================================
--
2.11.0


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 (Posted a comment)
  • -email is unavailable- added by bgarrigues (Updated the item)
  • -email is unavailable- added by schwarze (Posted a comment)
  • -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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-03-30 gbranden Summary[PATCH] troffrc: Define register 'F' to avoid warnings troffrc: define register 'F' to avoid warnings from pod2man-generated documents
    2022-03-05 gbranden CategoryNone Core
    2020-10-21 gbranden Severity2 - Minor 1 - Wish
        Item GroupWarning/Suspicious behaviour Feature change
        StatusNone Rejected
        Assigned toNone gbranden
        Open/ClosedOpen Closed
    2018-11-26 bgarrigues Severity3 - Normal 2 - Minor
        Item GroupFeature change Warning/Suspicious behaviour

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code