Hi Ralph,

On Thu, Jan 10 2019 at 10:46:37 PM, Ralph Corderoy <[email protected]> 
wrote:
>> Therefore I would like to add a '--debug' or '--log' option to 'groff'
>> that will make groff log all the calls to the preprocessors and to
>> troff into a file (so that stdin and stderr will not be impacted) and
>> also spread this option to all the preprocessors who will dump their
>> input into file
>
> At first glance it seems to overlap a bit with groff's -V and -VV
> options,
Yes I forgot about option -VV.  If something should be done at least I
should try to enhance these options (-VVV ?).

> and using `strace -fe execve -o st.out'.
I did not know these strace options, thanks for the tip.

> And since the pipelined programs run in parallel they presumably won't
> all be writing to the same input-and-output capture programs?
>
> Could what you want be achieved by a bunch of shims earlier in your
> PATH?  For example, a /bin/sh pic that cats stdin to a file, runs the
> real pic on it capturing its stdout, and finally cats that to the
> script's stdout?
What you suggest should work fine, but requires some manual operations.
What I would like is something straightforward like 'pdfmom -V <file>'
that propagates a debug option to 'groff' and its preprocessors, without
any need to modify the build or installation.  I guess I would need to
code it to see whether it's really useful or not compared to what you
have suggested.

Thanks for your advices,

Regards,

Bertrand

Reply via email to