Vincent Lefevre wrote in <20211027151035.ga14...@cventin.lip.ens-lyon.fr>: |On 2021-10-25 14:44:32 -0500, Derek Martin wrote: |> There is an ANSI escape sequence to tee data to your printer, sure... |> but it can not be used retroactively copy data that is on your |> terminal to the printer. It just copies data that is currently being |> displayed (i.e. since the sequence was emitted) to the printer. | |I was wondering whether this could occur when switching to the |alternate screen. But it seems that this is not the case, at least |not with Xterm's logging feature. | |So I assume that as long as the user doesn't use a virtual terminal |inside the real terminal, things are safe. Users of virtual terminals |(GNU Screen, etc.) should be careful, as older data are sent back to |the real terminal when switching a window, for instance. However, in |case of any issue, the real solution should be to ensure that the |printing feature is disabled.
Fwiw i implemented optional automatic clearance upon suspension (/ exit) when ca-mode (smcup..rmcup) is enabled for the mailer i maintain, blindly trusting your words (i use the st terminal). You and Oskari Pirhonen have a credit for this. I thought it is nice since the alternative screen cannot be reached via clear(1). (Granted the MUA is not really ca-mode compatible.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)