bugGNU roff - Bugs: bug #55301, grog: doesn't honor...

 
 

bug #55301: grog: doesn't honor GROFF_TYPESETTER

Submitter:  Eli Zaretskii <eliz>
Submitted:  Thu 27 Dec 2018 05:31:42 PM UTC
   
 
Category:  Utilities 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
   

Tue 29 Jun 2021 04:26:14 AM UTC, comment #4: 


commit 182942f0453fc138147780b237492b8c50e514c8
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Jun 28 21:08:09 2021 +1000

    [grog]: Refactor device (`-T` option) handling.

    * src/utils/grog/grog.pl: Redeclare `device` as a scalar instead of a
      list.

      (process_arguments): Generalize handling of `-T` and `-m` options to
      permit optional whitespace.  Rename scalar `was_T` to
      `delayed_option`.

      (infer_device): Stop unconditionally adding a `-T ps` argument to the
      generated groff command.  Remove logic that validates any given `-T`
      option argument; instead, let groff fail if a bad one is supplied (its
      own diagnostics in this scenario were improved in commit 5a721a30, 27
      May).  This makes grog agnostic about any differently configured
      default device in groff itself, and about the GROFF_TYPESETTER
      environment variable.

      Fixes <https://savannah.gnu.org/bugs/?55301> by getting out of the
      way.

    * src/utils/grog/tests/PF-does-not-start-pic-region.sh:
    * src/utils/grog/tests/smoke-test.sh: Update expected output.


G. Branden Robinson <gbranden>
Group administrator
Mon 28 Jun 2021 11:15:20 AM UTC, comment #3: 

Removing patch annotation.

It makes more sense to me to have grog just get out of the way and stop unconditionally injecting a -T option into the emitted command.  It's simply not necessary to do so.

G. Branden Robinson <gbranden>
Group administrator
Mon 07 Jun 2021 09:49:20 PM UTC, comment #2: 

Categorizing grog bugs as Utilities, per discussion.

Dave <barx>
Group Member
Fri 25 Dec 2020 04:43:40 PM UTC, comment #1: 

From 2918493dc289b3c11bad210ed372aba65d5fe3a9 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Fri, 25 Dec 2020 16:39:17 +0000
Subject: [PATCH] grog/subs.pl: Use GROFF_TYPESETTER if defined and no '-T'
 option

src/roff/grog/subs.pl: Use GROFF_TYPESETTER if defined and no '-T'
option

  Use the value of the environmental variable GROFF_TYPESETTER,
if there is no '-T' option on the command line.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 src/roff/grog/subs.pl | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 82550ed5..e40450d5 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -917,7 +917,15 @@ sub make_groff_device {

   # default device is 'ps' when without '-T'
   my $device;
-  push @devices, 'ps' unless ( @devices );
+
+  if ( ! @devices ) {
+    if ( defined $ENV{'GROFF_TYPESETTER'} ) {
+      push @devices, $ENV{'GROFF_TYPESETTER'};
+      }
+    else {
+      push @devices, 'ps';
+    }
+  }

 ###### make_groff_device()
   for my $d ( @devices ) {
--
2.29.2


Bjarni Ingi Gislason <bjarniig>
Thu 27 Dec 2018 05:31:42 PM UTC, original submission:  

In Groff 1.22.4, the default device of 'grog' seems to have been changed: it is now 'ps'.  What's more, 'grog' doesn't honor GROFF_TYPESETTER (which I have set to 'ascii'), so now I have to invoke 'grog' with an explicit "-Tascii" option to get previous behavior.

Please teach 'grog' to honor GROFF_TYPESETTER.

Eli Zaretskii <eliz>

 

(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 (Posted a comment)
  • -email is unavailable- added by eliz (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
    2021-06-29 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2021-06-28 gbranden Summary[PATCH] 'grog' doesn't honor GROFF_TYPESETTER grog: doesn't honor GROFF_TYPESETTER
    2021-06-28 gbranden StatusNone In Progress
        Assigned toNone gbranden
    2021-06-07 barx Carbon-CopyRemoved 93119 -
    2021-06-07 barx CategoryPreprocessor - others/general Utilities
    2021-06-07 barx Summary'grog' doesn't honor GROFF_TYPESETTER [PATCH] 'grog' doesn't honor GROFF_TYPESETTER

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code