Use contents of an output variable as current input

Maybe I wasn't clear in my initial description of the two proposed functions, let's try again.


The initial motivation was to use the contents of an output variable as the current input. This would make the current workaround using RegexpReplace "^.*" "%output%" obsolete.

The new function would replace the current input buffer, and would not emit anything to the current output.

I'd still go with two separate functions, one that serves as a counterpart to Say, and another that serves as a counterpart to SayFormat.

  1. Function Use S
    Example: Use "some text and %output%"
    (this is equivalent to what the current workaround with RegexpReplace "^.*" does, except for the need to escape)

  2. Function UseFormat S
    Example: UseFormat "some text and $sort(%_current%,-)"
    (this is something that isn't possible at the moment, only via SayFormat to a temporary output and then applying the RegexpReplace "^.*" workaround)