For Development HEAD DRAFTSearch (procedure/syntax/module):

12.74 text.pager - Display with pager

Module: text.pager

A convenience module to present long text nicely to the user.

Parameter: pager-program

{text.pager} A parameter containing a list of pager program and its arguments (e.g. ("/usr/bin/less" "-M")).

The program must take input from the standard input.

The default value is taken from the environment variable PAGER if set, or either less or more if those programs are available on the system. If none is found, #f is set.

Function: display/pager string

{text.pager} Display string by a pager subprocess specified by the parameter pager-program. The procedure returns when the subprocess exits.

If the terminal is not suitable for control (e.g. TERM is dumb or emacs), string is simply displayed without a pager.

If you’re running MinGW version of gosh on mintty, calling subprocess pager doesn’t work well, so the procedure emulate the pager behavior (pager-program is ignored).

Function: with-output-to-pager thunk

{text.pager} Call thunk with its current output port to a string buffer, then show the buffered output using display/pager.



For Development HEAD DRAFTSearch (procedure/syntax/module):
DRAFT