Re: \showstream oddity

Karl Berry <[email protected]>
Newsgroups gmane.comp.tex.live
Message-ID <[email protected]>
    The suggestion was not to change the default behaviour but to make
    \showstream/show have the same three options as \write that is:
        allocated stream: write to stream
        unallocated non-negative stream: write to log and terminal
        unallocated negative stream  write to log

    Currently \show doesn't distinguish negative values, which means you
    can't do
       \write\showstream{some preamble text}
       \show\foo

    and know the preamble will be printed to the same places as the \show.

    With no engine change if we set \showstream to a large positive
    value in the format then the above will work as long as a user
    never sets it negative, but an engine change to make negative
    values only write to the log could also be considered but it may
    be too late for an incompatible change as the pdftex manual has
    suggested -1 with the current behaviour for years

Just to be sure I understand: so you're saying that with the current
state of things, the problem is when \showstream is negative, right?
E.g.:
  \showstream=-1
  \immediate\write\showstream{preamble}
  \show\foo
will send "preamble" to just the log (since it's a \write-1) but the
\show\foo output to log+terminal.

My reactions are:

1) \showstream was invented only in 2021 by Marcel, so not that long
ago.

2) According to my grep -r, nothing but LaTeX uses it. So I don't
think it's out of the question to change the behavior.

3) But changing \showstream so that any negative number writes only to
the log would mean that only a "large positive number" would restore the
normal "log and terminal" behavior. It seems undesirable to me not to
have a definite value that gets back to normal.

4) Thus I could imagine using a special negative value, say -25 (no
particular reason), to mean go back to "log and terminal", while any
other negative value, in particular -1, means log-only, to match the
common practice for \write.

5) If we desire a change, I hope Marcel or someone there can prepare the
patches.

Wdyt? --thanks, karl.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.