bug-groff
[Top][All Lists]
Advanced

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

[bug #66537] tmac/pdfpic.tmac: missing ", qq(\\n)" before a perl 'if' co


From: G. Branden Robinson
Subject: [bug #66537] tmac/pdfpic.tmac: missing ", qq(\\n)" before a perl 'if' command
Date: Mon, 9 Dec 2024 04:55:48 -0500 (EST)

Follow-up Comment #6, bug #66537 (group groff):

At 2024-12-09T04:42:13-0500, Bjarni Ingi Gislason wrote:
> Follow-up Comment #5, bug #66537 (group groff):
>
> "info groff", search for '.pso': says (through ".so") that the
> "command" must end with a newline.

I think that's a misleading characterization.  When discussing `so`, and
even more so `pso`, we must carefully distinguish the argument given to
the request from the contents of the stream that the request produces
and reads.  Your comment implies the former.  Further, it is not
mandatory that the contents of the stream end with a newline, but one
must understand the consequences if it does not.

Perhaps your copy of the groff Texinfo manual is old; I have recently
revised and clarified this material.


 -- Request: .so ['"']file
 -- Request: .soquiet ['"']file
     Replace the 'so' request's control line with the contents of the
     file named by the argument, "sourcing" it.  FILE is sought in the
     directories specified by '-I' command-line option.  If FILE does
     not exist, a warning in category 'file' is produced and the request
     has no further effect.  *Note Warnings::, for information about the
     enablement and suppression of warnings.
...
     *Caution:* Since the formatter replaces the entire control line
     with the contents of a file, FILE must end with a newline, or the
     formatter will continue reading the next input line of the 'roff'
     file as if were part of the last line of the sourced file.
     Consider a file 'xxx' containing only the word 'foo' without a
     trailing newline.

          $ printf 'foo' > xxx
          $ groff <<EOF
          The situation is
          .so xxx
          bar.
          EOF
              => The situation is foobar.
...
 -- Request: .pso ['"']command
     Read the standard output from the specified COMMAND when passed to
     'popen(3)' and include it in place of the 'pso' request.
...
     The cautionary note regarding a final newline in the stream read by
     the 'so' request applies to 'pso' as well.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66537>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

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