[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] Rate this hack on a scale of 0 to stupid

From: Ingo Schwarze
Subject: Re: [groff] Rate this hack on a scale of 0 to stupid
Date: Mon, 7 Jan 2019 11:13:30 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

Hi John,

oh, and a few more remarks:

John Gardner wrote on Mon, Jan 07, 2019 at 08:08:51PM +1100:

>    1. I want/need a way to programmatically (and *reliably*) locate the
>    directories containing a Groff installation's .tmac files.

Plural for good reasons.  There is no guarantee all tmac files are in
the same directory.

> $ GROFF_TMAC_PATH=`pwd` groff -Tutf8 -z -mtrace-paths -man `man -w man`
> /usr/share/groff/1.19.2/tmac/an.tmac
> /usr/share/groff/1.19.2/tmac/troffrc-end
> /usr/share/man/man1/man.1

But this gives you only one directory, whereever an.tmac or
is located.

That said, no need for the man -w actually:

   > GROFF_TMAC_PATH=`pwd` groff -Tutf8 -z -mtrace-paths -man /dev/null

> 3. The containing directories are scooped up by Roff.js and scanned for
> `.tmac` files, which is a preparatory step to determine what macros are
> available and which aren't.

In that case, why not probe for the macros directly?
It doesn't matter where they are, or does it?

   > groff -man /dev/null > /dev/null ; echo $?
   > groff -mfoo /dev/null > /dev/null ; echo $?
  gtroff: fatal error: can't find macro file foo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]