diff --git a/docs/man-page/man_medley.html b/docs/man-page/man_medley.html index 5ce8e847..e75ac6be 100644 --- a/docs/man-page/man_medley.html +++ b/docs/man-page/man_medley.html @@ -1,164 +1,352 @@

NAME

medley — starts up Medley Interlisp

SYNOPSIS

-

medley [ flags ... ] [ SYSOUT_FILE ] [ -- PASS_ON_ARGS ]

+

medley [ flags ... ] [ SYSOUT_FILE ] [ -- +PASS_ON_ARGS ]

DESCRIPTION

Starts Medley Interlisp in a window.

OPTIONS

-

MEDLEYDIR is an environment variable set by Medley and used by many of the options described below. MEDLEYDIR is the top level directory of the Medley installation that contains the specific medley script that is invoked after all symbolic links are resolved. In the standard global installation this will be /usr/local/interlisp/medley. But Medley can be installed in multiple places on any given machine and hence MEDLEYDIR is computed on each invocation of medley.

+

MEDLEYDIR is an environment variable set by Medley +and used by many of the options described below. MEDLEYDIR is the top +level directory of the Medley installation that contains the specific +medley script that is invoked after all symbolic links are resolved. In +the standard global installation this will be +/usr/local/interlisp/medley. But Medley can be installed in multiple +places on any given machine and hence MEDLEYDIR is computed on each +invocation of medley.

Flags

-h, --help
-

Prints out a brief summary of the flags and arguments to medley.

+
+

Prints out a brief summary of the flags and arguments to medley.

-z, --man
-

Show the man page for medley

+
+

Show the man page for medley

-c [FILE | -], --config [FILE | -]
-

Use FILE as the config file for this run of Medley. See information on CONFIG FILE below.

-

If the given value is “-”, then suppress the use of a config file for this run of Medley.

+
+

Use FILE as the config file for this run of Medley. See +information on CONFIG FILE below.

+

If the given value is “-”, then suppress the use of a config file for +this run of Medley.

-f, --full
-

Start Medley from the standard “full” sysout. full.sysout includes a complete Interlisp and CommonLisp environment with a standard set of development tools. It does not include any of the applications built using Medley.

-

(See SYSOUT_FILE below for more information on starting sysouts.)

+
+

Start Medley from the standard “full” sysout. full.sysout includes a +complete Interlisp and CommonLisp environment with a standard set of +development tools. It does not include any of the applications built +using Medley.

+

(See SYSOUT_FILE below for more information on starting +sysouts.)

-l, --lisp
-

Start Medley from the standard “lisp” sysout. lisp.sysout only includes the basic Interlisp and CommonLisp environment.

-

(See SYSOUT_FILE below for more information on starting sysouts.)

+
+

Start Medley from the standard “lisp” sysout. lisp.sysout only +includes the basic Interlisp and CommonLisp environment.

+

(See SYSOUT_FILE below for more information on starting +sysouts.)

-a, --apps
-

Start Medley from the standard “apps” sysout. apps.sysout includes everything in full.sysout plus Medley applications including Notecards, Rooms and CLOS. It also includes pre-installed links to key Medley documentation.

-

(See SYSOUT_FILE below for more information on starting sysouts.)

+
+

Start Medley from the standard “apps” sysout. apps.sysout includes +everything in full.sysout plus Medley applications including Notecards, +Rooms and CLOS. It also includes pre-installed links to key Medley +documentation.

+

(See SYSOUT_FILE below for more information on starting +sysouts.)

-u, --continue
-

Nullify any prior setting of the sysout file (e.g., from the config file) - causing Medley to start from the virtual memory file resulting from the previous invocation (with the same values for –id and –logindir), if any. If there is no matching virtual memory file, Medley will start from the full.sysout (see -f/–full above).

+
+

Nullify any prior setting of the sysout file (e.g., from the config +file) - causing Medley to start from the virtual memory file resulting +from the previous invocation (with the same values for –id and +–logindir), if any. If there is no matching virtual memory file, Medley +will start from the full.sysout (see -f/–full above).

Equivalent to “-y -”.

(See SYSOUT FILE section below.)

-
-y [SYSOUT_FILE | -], --sysout [SYSOUT-FILE | -]
-

Start Medley from the specified SYSOUT-FILE. This is an alternative to specifying the SYSOUT-FILE as the last argument on the command line (but before any PASS_ON_ARGS). It can be used to specify the SYSOUT-FILE in the config file (see information on CONFIG FILE below).

-

If the given value is “-”, then any prior setting of the sysout file (e.g., from the config file) is nullified (see -u/–continue above).

+
-y [SYSOUT_FILE | -], --sysout [SYSOUT-FILE | +-]
+
+

Start Medley from the specified SYSOUT-FILE. This is an +alternative to specifying the SYSOUT-FILE as the last argument +on the command line (but before any PASS_ON_ARGS). It can be +used to specify the SYSOUT-FILE in the config file (see +information on CONFIG FILE below).

+

If the given value is “-”, then any prior setting of the sysout file +(e.g., from the config file) is nullified (see -u/–continue above).

(See SYSOUT FILE section below.)

-e [+ | -], --interlisp [+ | -]
-

If value is “+” or no value, make the initial Exec window within Medley be an Interlisp Exec. If value is “-”, make the initial Exec window be the default XCL Exec.

+
+

If value is “+” or no value, make the initial Exec window within +Medley be an Interlisp Exec. If value is “-”, make the initial Exec +window be the default XCL Exec.

This flag applies only when the –apps flag is used.

-n [+ | -], --noscroll [+ | -]
-

Medley ordinarily displays scroll bars to enable the user to pan the Medley virtual display within the Medley window. This is true even when the entire virtual display fits within the window.

-

Specifying “-n +” (–noscroll +) turns off scroll bars. Specifying “-n -” (–scroll -) turns on scroll bars. Specifying -n (–noscroll) with no value is equivalent to specifying “–noscroll +”.

+
+

Medley ordinarily displays scroll bars to enable the user to pan the +Medley virtual display within the Medley window. This is true even when +the entire virtual display fits within the window.

+

Specifying “-n +” (–noscroll +) turns off scroll bars. Specifying “-n +-” (–scroll -) turns on scroll bars. Specifying -n (–noscroll) with no +value is equivalent to specifying “–noscroll +”.

Default is scroll bars off.

-

Note: If scroll bars are off and the virtual screen is larger than the window, there will be no way to pan to the non-visible parts of the virtual display.

+

Note: If scroll bars are off and the virtual screen is larger than +the window, there will be no way to pan to the non-visible parts of the +virtual display.

-g [WxH | -], --geometry [WxH | -]
-

Sets the size of the X Window (or VNC window) that Medley runs in to be Width x Height. (Full X Windows geomtery specification with +X+Y is not currently supported).

+
+

Sets the size of the X Window (or VNC window) that Medley runs in to +be Width x Height. (Full X Windows geomtery specification with +X+Y is +not currently supported).

If a value of “-” is given, geometry is set to the default value.

-

If --geometry is not specified but --screensize is, then the window size will be determined based on the --screensize values and the --noscroll flag. If neither --geometry nor --screensize is provided, then the window size is set to 1440x900 if --noscroll is set and 1462x922 if --noscroll is not set.

-

(Also see note below under CONFIG FILE on the use of geometry and screensize in config files.)

+

If --geometry is not specified but --screensize is, then the window +size will be determined based on the --screensize values and the +--noscroll flag. If neither --geometry nor --screensize is provided, +then the window size is set to 1440x900 if --noscroll is set and +1462x922 if --noscroll is not set.

+

(Also see note below under CONFIG FILE on the use of +geometry and screensize in config files.)

-s [WxH | -], --screensize [WxH | -]
-

Sets the size of the virtual display as seen from Medley’s point of view. The Medley window is an unscaled viewport onto this virtual display.

-

If a value of “-” is given, screensize is set to the default value.

-

If --screensize is not specified but --geometry is, then the virtual display size will be set so that the entire virtual display fits into the given window geometry. If neither --screensize nor --geometry is provided, then the screen size is set to 1440x900.

-

(Also see note below under CONFIG FILE on the use of geometry and screensize in config files.)

+
+

Sets the size of the virtual display as seen from Medley’s point of +view. The Medley window is an unscaled viewport onto this virtual +display.

+

If a value of “-” is given, screensize is set to the default +value.

+

If --screensize is not specified but --geometry is, then the virtual +display size will be set so that the entire virtual display fits into +the given window geometry. If neither --screensize nor --geometry is +provided, then the screen size is set to 1440x900.

+

(Also see note below under CONFIG FILE on the use of +geometry and screensize in config files.)

-
-ps [N | -], –pixelscale [N | -] ** Applicable only when display is SDL-based (e.g., on Windows/Cygwin) **
-

Sets the pixel scaling factor to N, an integer

-

If value of “-” is given, the pixel scale factor is set to its default of 1.

+
-ps [N | -], –pixelscale [N | -] ** +Applicable only when display is SDL-based (e.g., on +Windows/Cygwin) **
+
+

Sets the pixel scaling factor to N, an integer

+

If value of “-” is given, the pixel scale factor is set to its +default of 1.

-t [STRING | -], --title [STRING | -]
-

Use STRING as title of Medley window.

-

If STRING includes the character sequence “%i”, then the value of the id string (see –id flag below) prefixed by “::” will be substituited for the “%i”. Example: if the id is “run_45” and STRING is “Medley Interlisp %i”, then the actual window title will be “Medley Interlisp :: run_45”.

-

If the value of “-” is given, sets the title to its default value (“Medley Interlisp %i”).

+
+

Use STRING as title of Medley window.

+

If STRING includes the character sequence “%i”, then the +value of the id string (see –id flag below) prefixed by “::” will be +substituited for the “%i”. Example: if the id is “run_45” and +STRING is “Medley Interlisp %i”, then the actual window title +will be “Medley Interlisp :: run_45”.

+

If the value of “-” is given, sets the title to its default value +(“Medley Interlisp %i”).

This flag is ignored when when the --vnc flag is set.

-d [:N | -], --display [:N | -]
-

Use X display :N.

-

If value is “-”, reset display to its default value. Default value is the value of $DISPLAY.

-

On platforms that support both SDL and X Windows, set the value of -d (–display) to “SDL” to select using SDL instead of X Windows.

-

This flag is ignored on the Windows/Cygwin platform and when the --vnc flag is set on Windows System for Linux.

+
+

Use X display :N.

+

If value is “-”, reset display to its default value. Default value is +the value of $DISPLAY.

+

On platforms that support both SDL and X Windows, set the value of -d +(–display) to “SDL” to select using SDL instead of X Windows.

+

This flag is ignored on the Windows/Cygwin platform and when the +--vnc flag is set on Windows System for Linux.

-
-v [+ | -] , --vnc [+ | -] ** Applicable only to WSL installations **
-

If value is “+” or no value is given, then use a VNC window running on the Windows side instead of an X window. If value is “-”, then do not use a VNC window, relying instead on a standard X Window.

-

A VNC window will folllow the Windows desktop scaling setting allowing for much more usable Medley on high resolution displays. On WSL, X windows do not scale well.

+
-v [+ | -] , --vnc [+ | -] ** Applicable only to WSL +installations **
+
+

If value is “+” or no value is given, then use a VNC window running +on the Windows side instead of an X window. If value is “-”, then do not +use a VNC window, relying instead on a standard X Window.

+

A VNC window will folllow the Windows desktop scaling setting +allowing for much more usable Medley on high resolution displays. On +WSL, X windows do not scale well.

This flag is always set for WSL1 installations.

-
-i [ID_STRING | - | --], --id [ID_STRING | - | --]
-

Use ID_STRING as the id for this run of Medley, unless the given value is “-”, “--”, or “---”.

-

Only one instance of Medley can be run simultaneously for any given id.

-

ID-STRING can consist of any alphanumeric character plus the underscore (_) character, ending (optionally) in a “+” character. If ID_STRING ends with a “+” (including just a singleton “+”), then Medley will add a number to the id to make it unique among currently running Medley intsances.

-

If the given value is “-”, then the id will be (re)set to “default” (e.g., if it was previously set in the config file). If it is “--”, then id will be set to the basename of $MEDLEYDIR. If ID_STRING is “---”, then id will be set to the basename of the parent directory of $MEDLEYDIR.

+
-i [ID_STRING | - | --], --id [ID_STRING | - | +--]
+
+

Use ID_STRING as the id for this run of Medley, unless the +given value is “-”, “--”, or “---”.

+

Only one instance of Medley can be run simultaneously for any given +id.

+

ID-STRING can consist of any alphanumeric character plus the +underscore (_) character, ending (optionally) in a “+” character. If +ID_STRING ends with a “+” (including just a singleton “+”), +then Medley will add a number to the id to make it unique among +currently running Medley intsances.

+

If the given value is “-”, then the id will be (re)set to “default” +(e.g., if it was previously set in the config file). If it is “--”, then +id will be set to the basename of $MEDLEYDIR. If ID_STRING is “---”, +then id will be set to the basename of the parent directory of +$MEDLEYDIR.

Default id is “default”.

-m [N | -], --mem [N | -]
-

Set Medley to run in N MB of virtual memory. Defaults to 256MB.

+
+

Set Medley to run in N MB of virtual memory. Defaults to +256MB.

If a value of “-” is given, resets to default value.

-p [FILE | -], --vmem [FILE | -]
-

Use FILE as the Medley virtual memory (vmem) store. FILE must be writeable by the current user.

-

Care must be taken not to use the same vmem FILE for two instances of Medley running simultaneously. The --id flag will not protect against vmem collisions when the --vmem flag is used.

-

If the value “-” is given, then resets the vmem file to the default.

-

Default is to store the vmem in LOGINDIR/vmem/lisp_III.virtualmem, where III is the id of this Medley run (see --id flag above). See --logindir below for setting of LOGINDIR.

+
+

Use FILE as the Medley virtual memory (vmem) store. +FILE must be writeable by the current user.

+

Care must be taken not to use the same vmem FILE for two instances of +Medley running simultaneously. The --id flag will not protect against +vmem collisions when the --vmem flag is used.

+

If the value “-” is given, then resets the vmem file to the +default.

+

Default is to store the vmem in LOGINDIR/vmem/lisp_III.virtualmem, +where III is the id of this Medley run (see --id flag above). See +--logindir below for setting of LOGINDIR.

-r [FILE | -], --greet [FILE | -]
-

Use FILE as the Medley greetfile.

-

If the given value is “-”, Medley will start up without using a greetfile.

-

The default Medley greetfile is $MEDLEYDIR/greetfiles/MEDLEYDIR-INIT, except when the --apps flag is used in which case it is $MEDLEYDIR/greetfiles/APPS-INIT.

-

On Windows/Cygwin installations, FILE is specified in the Medley file system, not the host Windows file system.

+
+

Use FILE as the Medley greetfile.

+

If the given value is “-”, Medley will start up without using a +greetfile.

+

The default Medley greetfile is $MEDLEYDIR/greetfiles/MEDLEYDIR-INIT, +except when the --apps flag is used in which case it is +$MEDLEYDIR/greetfiles/APPS-INIT.

+

On Windows/Cygwin installations, FILE is specified in the +Medley file system, not the host Windows file system.

+
+
-cm [FILE | -], --rem.cm [FILE | -]
+
+

Use FILE as the REM.CM file that Medley reads and executes +at startup - after any greet files. Usually used only for loadups and +other maintenance operations .

+

If the given value is “-”, Medley will start up without using REM.CM +file.

+

There is no default Medley REM.CM file.

+

On Windows/Cygwin installations, FILE is specified in the +Medley file system, not the host Windows file system.

-x [DIR | - | –], --logindir [DIR | - | –]
-

Use DIR as LOGINDIR in Medley. DIR must be writeable by the current user.

-

LOGINDIR is used by Medley as the working directory on start-up and where it loads any “personal” initialization file from.

-

If the given value is “-”, then reset LOGINDIR to its default value. If the given value is “–”, uses $MEDLEYDIR/logindir as LOGINDIR.

+
+

Use DIR as LOGINDIR in Medley. DIR must be +writeable by the current user.

+

LOGINDIR is used by Medley as the working directory on start-up and +where it loads any “personal” initialization file from.

+

If the given value is “-”, then reset LOGINDIR to its default value. +If the given value is “–”, uses $MEDLEYDIR/logindir as LOGINDIR.

LOGINDIR defaults to $HOME/il.

-

On Windows/Cygwin installations, FILE is specified in the Medley file system, not the host Windows file system.

+

On Windows/Cygwin installations, FILE is specified in the +Medley file system, not the host Windows file system.

-
-nh Host:Port:Mac:Debug, --nethub Host:Port:Mac:Debug
-

Set the parameters for using Nethub XNS networking. Host is the full domain name of the nethub host. Port is the port on Host that nethub is using. Mac is the Mac address that this instance of Medley should use when contacting the nethub host. Debug is the level of nethub debug information that should be printed on stdout (value is 0, 1, or 2). A Host value is required and serves to turn nethub functionality on. Port, Mac and Debug parameters are optional and will default if left off.

-

If any of the parameters have a value of “-”, any previous setting (e.g., in a config file) for the parameter will be reset to the default value - which in the case of Host is the null string, turning nethub functionality off.

+
-nh Host:Port:Mac:Debug, --nethub +Host:Port:Mac:Debug
+
+

Set the parameters for using Nethub XNS networking. Host is +the full domain name of the nethub host. Port is the port on +Host that nethub is using. Mac is the Mac address that +this instance of Medley should use when contacting the nethub host. +Debug is the level of nethub debug information that should be +printed on stdout (value is 0, 1, or 2). A Host value is +required and serves to turn nethub functionality on. Port, +Mac and Debug parameters are optional and will default +if left off.

+

If any of the parameters have a value of “-”, any previous setting +(e.g., in a config file) for the parameter will be reset to the default +value - which in the case of Host is the null string, turning +nethub functionality off.

-nf, -NF, –nofork
-

No fork. Relevant only to the Medley loadup workflow.

+
+

No fork. Relevant only to the Medley loadup workflow.

-prog EXE, –maikoprog EXE
-

Use EXE as the basename of the Maiko executable. Relevant only to the Medley loadup workflow.

+
+

Use EXE as the basename of the Maiko executable. Relevant +only to the Medley loadup workflow.

–maikodir DIR
-

Use DIR as the directory containing the Maiko emulator. For testing purposes only.

+
+

Use DIR as the directory containing the Maiko emulator. For +testing purposes only.

+
+
-cc [FILE | -], --repeat [FILE | -]
+
+

Run Medley once. And then as long as FILE exists and is +greater then zero length, repeatedly run Medley using FILE as +the REM.CM file that Medley reads and executes at startup. Each run of +Medley can change the contents of FILE to effect the subsequent +run of Medley. To end the cycle, Medley needs to delete FILE. +WIthin Medley, FILE can be found as the value of the +environment variable LDEREPEATCM.

+

On Windows/Cygwin installations, FILE is specified in the +Medley file system, not the host Windows file system.

Other Options

SYSOUT_FILE
-

The pathname of the file to use as a sysout for Medley to start from. If SYSOUT_FILE is not provided and none of the flags (--apps, --full, --lisp) is used, then Medley will start from the saved virtual memory file from the previous session with the same ID_STRING as this run. If no such virtual memory file exists, then Medley will start from the standard full.sysout (equivalent to specifying the --full flag). On Windows (Docker) installations, SYSOUT_FILE is specified in the Medley file system, not the host Windows file system.

+
+

The pathname of the file to use as a sysout for Medley to start from. +If SYSOUT_FILE is not provided and none of the flags (--apps, --full, +--lisp) is used, then Medley will start from the saved virtual memory +file from the previous session with the same ID_STRING as this run. If +no such virtual memory file exists, then Medley will start from the +standard full.sysout (equivalent to specifying the --full flag). On +Windows (Docker) installations, SYSOUT_FILE is specified in the +Medley file system, not the host Windows file system.

PASS_ON_ARGS
-

All arguments after the “--” flag, are passed unaltered to the Maiko emulator.

+
+

All arguments after the “--” flag, are passed unaltered to the Maiko +emulator.

CONFIG FILE

-

A config file can be used to “pre-specify” any of the above command line arguments. The config file consists of command line arguments (flags or flag-value pairs), one per line. These arguments are read from the config file and prepended to the arguments actually given on the command line. Since later arguments override earlier arguments, any argument actually given on the command line will override a conflicting argument given in the config file.

-

Unless specified using the -c (–config) argument, the default config file will be $MEDLEYDIR/.medley_config, if it exists, and $HOME/.medley_config, otherwise.

-

Specifying, “-c -” or “–config -” on the command line will suppress the use of config files for the current run of Medley.

-

Note: care must be taken when using -g (–geometry) and/or -s (–screensize) arguments in config files. If only one of these is specified, then the other is conputed. But if both are specified, then the specified dimensions are used as given. Unexpected results can arise if one is specified in the config file but the other is specified on the command line. In this case, the two specified dimensions will be used as given. It will not be the case, as might be expected, that the dimension given in the config file will be overridden by a dimension computed from the dimension given on the command line.

+

A config file can be used to “pre-specify” any of the above command +line arguments. The config file consists of command line arguments +(flags or flag-value pairs), one per line. These arguments are +read from the config file and prepended to the arguments actually given +on the command line. Since later arguments override earlier arguments, +any argument actually given on the command line will override a +conflicting argument given in the config file.

+

Unless specified using the -c (–config) argument, the default config +file will be $MEDLEYDIR/.medley_config, if it exists, and +$HOME/.medley_config, otherwise.

+

Specifying, “-c -” or “–config -” on the command line will suppress +the use of config files for the current run of Medley.

+

Note: care must be taken when using -g (–geometry) and/or -s +(–screensize) arguments in config files. If only one of these is +specified, then the other is conputed. But if both are specified, then +the specified dimensions are used as given. Unexpected results can arise +if one is specified in the config file but the other is specified on the +command line. In this case, the two specified dimensions will be used as +given. It will not be the case, as might be expected, that the dimension +given in the config file will be overridden by a dimension computed from +the dimension given on the command line.

OTHER FILES

$HOME/il
-

Default Medley LOGINDIR

+
+

Default Medley LOGINDIR

$HOME/il/vmem/lisp.virtualmem
-

Default virtual memory file

+
+

Default virtual memory file

$HOME/il/INIT(.LCOM)
-

Default personal init file

+
+

Default personal init file

$MEDLEYDIR/greetfiles/MEDLEYDIR-INIT(.LCOM)
-

Default Medley greetfile

+
+

Default Medley greetfile

BUGS

-

See GitHub Issues: <https://github.com/Interlisp/medley/issues>

+

See GitHub Issues: +<https://github.com/Interlisp/medley/issues>

COPYRIGHT

Copyright(c) 2023-2024 by Interlisp.org

diff --git a/docs/man-page/medley.1 b/docs/man-page/medley.1 index 2de1cb48..c2da6a5d 100644 --- a/docs/man-page/medley.1 +++ b/docs/man-page/medley.1 @@ -1,5 +1,19 @@ -.\" Automatically generated by Pandoc 2.9.2.1 +.\" Automatically generated by Pandoc 3.1.3 .\" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} .ad l .TH "MEDLEY" "1" "" "" "Start Medley Interlisp" .nh @@ -8,8 +22,8 @@ \f[B]medley\f[R] \[em] starts up Medley Interlisp .SH SYNOPSIS .PP -\f[B]medley\f[R] [ flags \&... ] [ \f[I]SYSOUT_FILE\f[R] ] [ -- -\f[I]PASS_ON_ARGS\f[R] ] +\f[B]medley\f[R] [ flags \&... +] [ \f[I]SYSOUT_FILE\f[R] ] [ -- \f[I]PASS_ON_ARGS\f[R] ] .SH DESCRIPTION .PP Starts Medley Interlisp in a window. @@ -291,6 +305,21 @@ On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the Medley file system, not the host Windows file system. .RE .TP +-cm [\f[I]FILE\f[R] | -], --rem.cm [\f[I]FILE\f[R] | -] +Use \f[I]FILE\f[R] as the REM.CM file that Medley reads and executes at +startup - after any greet files. +Usually used only for loadups and other maintenance operations . +.RS +.PP +If the given value is \[lq]-\[rq], Medley will start up without using +REM.CM file. +.PP +There is no default Medley REM.CM file. +.PP +On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the +Medley file system, not the host Windows file system. +.RE +.TP -x [\f[I]DIR\f[R] | - | \[en]], --logindir [\f[I]DIR\f[R] | - | \[en]] Use \f[I]DIR\f[R] as LOGINDIR in Medley. \f[I]DIR\f[R] must be writeable by the current user. @@ -341,6 +370,22 @@ Relevant only to the Medley loadup workflow. \[en]maikodir \f[I]DIR\f[R] Use \f[I]DIR\f[R] as the directory containing the Maiko emulator. For testing purposes only. +.TP +-cc [\f[I]FILE\f[R] | -], --repeat [\f[I]FILE\f[R] | -] +Run Medley once. +And then as long as \f[I]FILE\f[R] exists and is greater then zero +length, repeatedly run Medley using \f[I]FILE\f[R] as the REM.CM file +that Medley reads and executes at startup. +Each run of Medley can change the contents of \f[I]FILE\f[R] to effect +the subsequent run of Medley. +To end the cycle, Medley needs to delete \f[I]FILE\f[R]. +WIthin Medley, \f[I]FILE\f[R] can be found as the value of the +environment variable LDEREPEATCM. +.RS +.PP +On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the +Medley file system, not the host Windows file system. +.RE .SS Other Options .PP \ diff --git a/docs/man-page/medley.1.gz b/docs/man-page/medley.1.gz index 6bc62545..4e563a85 100644 Binary files a/docs/man-page/medley.1.gz and b/docs/man-page/medley.1.gz differ diff --git a/docs/man-page/medley.1.md b/docs/man-page/medley.1.md index c4c9a24c..28215964 100644 --- a/docs/man-page/medley.1.md +++ b/docs/man-page/medley.1.md @@ -1,4 +1,4 @@ -% MEDLEY(1) | Start Medley Interlisp +% MEDLEY(1) | Start Medley Interlisp --- adjusting: l @@ -210,6 +210,16 @@ in which case it is $MEDLEYDIR/greetfiles/APPS-INIT. On Windows/Cygwin installations, *FILE* is specified in the Medley file system, not the host Windows file system. +-cm \[*FILE* | -], \-\-rem.cm \[*FILE* | -] +: Use *FILE* as the REM.CM file that Medley reads and executes at startup - after any greet files. Usually used only for loadups and other maintenance operations . + + If the given value is "-", Medley will start up without using REM.CM file. + + There is no default Medley REM.CM file. + + On Windows/Cygwin installations, *FILE* is +specified in the Medley file system, not the host Windows file system. + -x \[*DIR* | - | --], \-\-logindir \[*DIR* | - | --] : Use *DIR* as LOGINDIR in Medley. *DIR* must be writeable by the current user. @@ -242,6 +252,12 @@ for the parameter will be reset to the default value - which in the case of *Hos --maikodir *DIR* : Use *DIR* as the directory containing the Maiko emulator. For testing purposes only. +-cc \[*FILE* | -], \-\-repeat \[*FILE* | -] +: Run Medley once. And then as long as *FILE* exists and is greater then zero length, repeatedly run Medley using *FILE* as the REM.CM file that Medley reads and executes at startup. Each run of Medley can change the contents of *FILE* to effect the subsequent run of Medley. To end the cycle, Medley needs to delete *FILE*. WIthin Medley, *FILE* can be found as the value of the environment variable LDEREPEATCM. + + On Windows/Cygwin installations, *FILE* is +specified in the Medley file system, not the host Windows file system. + Other Options ------------- diff --git a/scripts/loadup-apps-from-full.sh b/scripts/loadup-apps-from-full.sh index e698aa86..c5d925a8 100755 --- a/scripts/loadup-apps-from-full.sh +++ b/scripts/loadup-apps-from-full.sh @@ -32,10 +32,11 @@ main() { exit 1 fi - git_commit_ID "${NOTECARDSDIR}" - NOTECARDS_COMMIT_ID="${COMMIT_ID}" - export NOTECARDS_COMMIT_ID + git_commit_ID "${NOTECARDSDIR}" + NOTECARDS_COMMIT_ID="${COMMIT_ID}" + export NOTECARDS_COMMIT_ID + initfile="-" cat >"${cmfile}" <<-"EOF" " diff --git a/scripts/loadup-aux.sh b/scripts/loadup-aux.sh index 91c3b6ca..bb2d758d 100755 --- a/scripts/loadup-aux.sh +++ b/scripts/loadup-aux.sh @@ -8,6 +8,7 @@ main() { loadup_start + initfile="-" cat >"${cmfile}" <<-"EOF" " (PROG diff --git a/scripts/loadup-db-from-full.sh b/scripts/loadup-db-from-full.sh index 55ab287b..9aec9c74 100755 --- a/scripts/loadup-db-from-full.sh +++ b/scripts/loadup-db-from-full.sh @@ -13,6 +13,7 @@ main() { exit 1 fi + initfile="-" cat >"${cmfile}" <<-"EOF" " diff --git a/scripts/loadup-full-from-lisp.sh b/scripts/loadup-full-from-lisp.sh index 34b3ae46..98e46042 100755 --- a/scripts/loadup-full-from-lisp.sh +++ b/scripts/loadup-full-from-lisp.sh @@ -6,6 +6,7 @@ main() { loadup_start + initfile="-" cat >"${cmfile}" <<-"EOF" " diff --git a/scripts/loadup-init.sh b/scripts/loadup-init.sh index 737f32f9..28f25e5a 100755 --- a/scripts/loadup-init.sh +++ b/scripts/loadup-init.sh @@ -6,7 +6,8 @@ main() { loadup_start - cat >"${cmfile}" <<-"EOF" + cmfile="-" + cat >"${initfile}" <<-"EOF" (* "make init files; this file is loaded as a 'greet' file by scripts/loadup-init.sh") (SETQ MEDLEYDIR NIL) @@ -40,7 +41,7 @@ main() { (LOGOUT T) STOP EOF - + run_medley "${LOADUP_SOURCEDIR}/starter.sysout" loadup_finish "init.dlinit" "init.*" "RDSYS*" "I-NEW*" diff --git a/scripts/loadup-lisp-from-mid.sh b/scripts/loadup-lisp-from-mid.sh index f7b679b0..346ba69e 100755 --- a/scripts/loadup-lisp-from-mid.sh +++ b/scripts/loadup-lisp-from-mid.sh @@ -5,7 +5,8 @@ main() { . "${LOADUP_SCRIPTDIR}/loadup-setup.sh" loadup_start - + + initfile="-" cat >"${cmfile}" <<-"EOF" " diff --git a/scripts/loadup-mid-from-init.sh b/scripts/loadup-mid-from-init.sh index ed7bc94d..59ff9c67 100755 --- a/scripts/loadup-mid-from-init.sh +++ b/scripts/loadup-mid-from-init.sh @@ -6,6 +6,7 @@ main() { loadup_start + initfile="-" cat >"${cmfile}" <<-"EOF" " (MOVD? (QUOTE NILL) (QUOTE PROMPTPRINT)) diff --git a/scripts/loadup-setup.sh b/scripts/loadup-setup.sh index be7305b2..de2af554 100644 --- a/scripts/loadup-setup.sh +++ b/scripts/loadup-setup.sh @@ -72,6 +72,7 @@ touch "${LOADUP_WORKDIR}"/loadup.timestamp script_name=$(basename "$0" ".sh") cmfile="${LOADUP_WORKDIR}/${script_name}.cm" +initfile="${LOADUP_WORKDIR}/${script_name}.init" # look thru args looking to see if oldschool was specified in args j=1 @@ -153,13 +154,14 @@ loadup_finish () { run_medley () { if [ ! "${LOADUP_OLDSCHOOL}" = true ] then - /bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \ + /bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \ --config - \ --id loadup_+ \ --geometry "${geometry}" \ --noscroll \ --logindir "${LOADUP_LOGINDIR}" \ - --greet "${cmfile}" \ + --rem.cm "${cmfile}" \ + --greet "${initfile}" \ --sysout "$1" \ "$2" "$3" "$4" "$5" "$6" "$7" ; exit_code=$? diff --git a/scripts/medley/medley.command b/scripts/medley/medley.command index 5a4eb015..7b85644b 100755 --- a/scripts/medley/medley.command +++ b/scripts/medley/medley.command @@ -586,6 +586,13 @@ flags: -x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley + -cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname. + + -cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file. + + -cc FILE | --repeat FILE : as long as FILE exists and is greater than 0 length, repeat Medley run + using FILE as REM.CM + sysout: The pathname of the file to use as a sysout for Medley to start from. If sysout is not provided and none of the flags [-a, -f & -l] is used, then Medley will start from @@ -629,7 +636,8 @@ nh_mac_arg="" nh_debug_arg="" pixelscale_arg="" borderwidth_arg="" - +remcm_arg="${LDEREMCM}" +repeat_cm="" # Add marker at end of args so we can accumulate pass-on args in args array set -- "$@" "--start_of_pass_args" @@ -648,6 +656,28 @@ do # already handled so just skip both flag and value shift; ;; + -cm | --rem.cm | --remcm) + if [ "$2" = "-" ] || [ "$2" = "--" ] + then + remcm_arg="" + else + check_for_dash_or_end "$1" "$2" + check_file_readable "$1" "$2" + remcm_arg="$2" + fi + shift + ;; + -cc | --repeat.cm | --repeat) + if [ "$2" = "-" ] || [ "$2" = "--" ] + then + repeat_cm="" + else + check_for_dash_or_end "$1" "$2" + # check_file_readable "$1" "$2" + repeat_cm="$2" + fi + shift + ;; -d | --display) if [ "$2" = "-" ] then @@ -1219,6 +1249,10 @@ else fi export LDEINIT +# figure out rem.cm and repeat.cm situation +export LDEREMCM="${remcm_arg}" +export LDEREPEATCM="${repeat_cm}" + # figure out noscroll situation noscroll_arg="" if [ "${noscroll}" = true ] @@ -1415,12 +1449,24 @@ then fi -# Run maiko either directly or with vnc -if [ "${use_vnc}" = true ] -then - # do the vnc thing - if called for - # shellcheck source=./medley_vnc.sh -# . "${SCRIPTDIR}/medley_vnc.sh" +# Repeatedly run medley as long as there is a repeat_cm file called for and it exists and is not zero length +# In most cases, there will be no repeat_cm and hence medley will only run once + +loop_ctr=0 +while [ ${loop_ctr} -eq 0 ] || { [ -n "${repeat_cm}" ] && [ -f "${repeat_cm}" ] && [ -s "${repeat_cm}" ] ; } +do + if [ ${loop_ctr} -eq 1 ] + then + LDEREMCM="${repeat_cm}" + fi + loop_ctr=1 + + # Run maiko either directly or with vnc + if [ "${use_vnc}" = true ] + then + # do the vnc thing - if called for + # shellcheck source=./medley_vnc.sh +# . "${SCRIPTDIR}/medley_vnc.sh" # shellcheck shell=sh # shellcheck disable=SC2154,SC2162 ############################################################################### @@ -1658,9 +1704,15 @@ then true ####################################### -else - # If not using vnc, just exec maiko directly - # handing over the pass-on args which are all thats left in the main args array - start_maiko "$@" -fi + else + # If not using vnc, just exec maiko directly + # handing over the pass-on args which are all thats left in the main args array + start_maiko "$@" + fi + if [ -n "${exit_code}" ] && [ ${exit_code} -ne 0 ] + then + exit ${exit_code} + fi + +done exit ${exit_code} diff --git a/scripts/medley/medley_args.sh b/scripts/medley/medley_args.sh index 2cc6c91b..2b1dfc51 100755 --- a/scripts/medley/medley_args.sh +++ b/scripts/medley/medley_args.sh @@ -46,7 +46,8 @@ nh_mac_arg="" nh_debug_arg="" pixelscale_arg="" borderwidth_arg="" - +remcm_arg="${LDEREMCM}" +repeat_cm="" # Add marker at end of args so we can accumulate pass-on args in args array set -- "$@" "--start_of_pass_args" @@ -65,6 +66,28 @@ do # already handled so just skip both flag and value shift; ;; + -cm | --rem.cm | --remcm) + if [ "$2" = "-" ] || [ "$2" = "--" ] + then + remcm_arg="" + else + check_for_dash_or_end "$1" "$2" + check_file_readable "$1" "$2" + remcm_arg="$2" + fi + shift + ;; + -cc | --repeat.cm | --repeat) + if [ "$2" = "-" ] || [ "$2" = "--" ] + then + repeat_cm="" + else + check_for_dash_or_end "$1" "$2" + # check_file_readable "$1" "$2" + repeat_cm="$2" + fi + shift + ;; -d | --display) if [ "$2" = "-" ] then diff --git a/scripts/medley/medley_run.sh b/scripts/medley/medley_run.sh index 8485e15c..6947aa90 100644 --- a/scripts/medley/medley_run.sh +++ b/scripts/medley/medley_run.sh @@ -130,6 +130,10 @@ else fi export LDEINIT +# figure out rem.cm and repeat.cm situation +export LDEREMCM="${remcm_arg}" +export LDEREPEATCM="${repeat_cm}" + # figure out noscroll situation noscroll_arg="" if [ "${noscroll}" = true ] @@ -326,15 +330,33 @@ then fi -# Run maiko either directly or with vnc -if [ "${use_vnc}" = true ] -then - # do the vnc thing - if called for - # shellcheck source=./medley_vnc.sh - . "${SCRIPTDIR}/medley_vnc.sh" -else - # If not using vnc, just exec maiko directly - # handing over the pass-on args which are all thats left in the main args array - start_maiko "$@" -fi +# Repeatedly run medley as long as there is a repeat_cm file called for and it exists and is not zero length +# In most cases, there will be no repeat_cm and hence medley will only run once + +loop_ctr=0 +while [ ${loop_ctr} -eq 0 ] || { [ -n "${repeat_cm}" ] && [ -f "${repeat_cm}" ] && [ -s "${repeat_cm}" ] ; } +do + if [ ${loop_ctr} -eq 1 ] + then + LDEREMCM="${repeat_cm}" + fi + loop_ctr=1 + + # Run maiko either directly or with vnc + if [ "${use_vnc}" = true ] + then + # do the vnc thing - if called for + # shellcheck source=./medley_vnc.sh + . "${SCRIPTDIR}/medley_vnc.sh" + else + # If not using vnc, just exec maiko directly + # handing over the pass-on args which are all thats left in the main args array + start_maiko "$@" + fi + if [ -n "${exit_code}" ] && [ ${exit_code} -ne 0 ] + then + exit ${exit_code} + fi + +done exit ${exit_code} diff --git a/scripts/medley/medley_usage.sh b/scripts/medley/medley_usage.sh index f933413d..e241ab16 100644 --- a/scripts/medley/medley_usage.sh +++ b/scripts/medley/medley_usage.sh @@ -115,6 +115,13 @@ flags: -x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley + -cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname. + + -cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file. + + -cc FILE | --repeat FILE : as long as FILE exists and is greater than 0 length, repeat Medley run + using FILE as REM.CM + sysout: The pathname of the file to use as a sysout for Medley to start from. If sysout is not provided and none of the flags [-a, -f & -l] is used, then Medley will start from diff --git a/sources/ADIR b/sources/ADIR index b9cd641c..944285b5 100644 --- a/sources/ADIR +++ b/sources/ADIR @@ -1,12 +1,10 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED "20-Jan-2025 13:37:28" {DSK}briggs>Projects>medley>sources>ADIR.;48 70144 +(FILECREATED " 6-Feb-2025 17:48:54" {DSK}frank>il>medley>sources>ADIR.;6 70091 - :EDIT-BY "briggs" + :CHANGES-TO (FNS INTERPRET.REM.CM) - :CHANGES-TO (FNS \LOGOUT0 LOGOUT) - - :PREVIOUS-DATE "31-Dec-2024 11:45:01" {DSK}briggs>Projects>medley>sources>ADIR.;47) + :PREVIOUS-DATE "20-Jan-2025 13:37:28" {DSK}frank>il>medley>sources>ADIR.;3) (PRETTYCOMPRINT ADIRCOMS) @@ -1178,12 +1176,12 @@ HERALDSTRING]) (INTERPRET.REM.CM - [LAMBDA (RETFLG) (* ; "Edited 15-Mar-2021 12:27 by larry") + [LAMBDA (RETFLG) (* ; "Edited 15-Mar-2021 12:27 by larry") (DECLARE (GLOBALVARS STARTUPFORM)) (* ;;; "Looks at REM.CM and evaluates the form there if the first character of the file is open paren or doublequote. If it's a string, it will be unread,, else the form will be evaluated at the next prompt. For use in INIT.LISP, among others. If RETFLG is true, the expression read is simply returned") - (PROG ((FILE (UNIX-GETENV "LDEINIT")) + (PROG ([FILE (INFILEP (PACKFILENAME 'HOST '{DSK} 'BODY (UNIX-GETENV "LDEREMCM"] COM) (OR FILE (RETURN)) (SETQ FILE (OPENSTREAM FILE 'INPUT)) @@ -1198,11 +1196,10 @@ (RETFLG (* ; "Save it to return")) (T (* ; "Unread a string") (* ; - "RMK: Replace CR and LF by space to avoid EOL convention issues") - (for I from 1 to (NCHARS COM) - when (FMEMB (NTHCHARCODE COM I) - (CHARCODE (CR LF EOL))) do (RPLCHARCODE COM I (CHARCODE - EOL))) + "RMK: Replace CR and LF by space to avoid EOL convention issues") + (for I from 1 to (NCHARS COM) when (FMEMB (NTHCHARCODE COM I) + (CHARCODE (CR LF EOL))) + do (RPLCHARCODE COM I (CHARCODE EOL))) (BKSYSBUF COM] (T (CLOSEF FILE))) (RETURN (COND @@ -1282,14 +1279,14 @@ (ADDTOVAR LAMA PACKFILENAME.STRING PACKFILENAME) ) (DECLARE%: DONTCOPY - (FILEMAP (NIL (3225 16052 (DELFILE 3235 . 3396) (FULLNAME 3398 . 3765) (INFILE 3767 . 4026) (INFILEP -4028 . 4163) (IOFILE 4165 . 4416) (OPENFILE 4418 . 4721) (OPENSTREAM 4723 . 9063) (OUTFILE 9065 . 9327 -) (OUTFILEP 9329 . 9465) (RENAMEFILE 9467 . 9773) (SIMPLE.FINDFILE 9775 . 10185) (VMEMSIZE 10187 . -10354) (\COPYSYS 10356 . 14647) (\FLUSHVM 14649 . 15721) (\LOGOUT0 15723 . 16050)) (16551 41211 ( -UNPACKFILENAME.STRING 16561 . 38397) (\UPF.DIRECTORY 38399 . 41209)) (42739 45045 (UNPACKFILENAME -42749 . 42935) (LASTCHPOS 42937 . 43631) (FILENAMEFIELD 43633 . 43927) (FILENAMEFIELD.STRING 43929 . -44333) (PACKFILENAME 44335 . 44678) (PACKFILENAME.STRING 44680 . 45043)) (59515 60428 ( -FILEDIRCASEARRAY 59525 . 60426)) (60595 67903 (LOGOUT 60605 . 61650) (MAKESYS 61652 . 63281) (SYSOUT -63283 . 64835) (SAVEVM 64837 . 65637) (HERALD 65639 . 65799) (INTERPRET.REM.CM 65801 . 67526) ( -\USEREVENT 67528 . 67901)) (68085 69812 (USERNAME 68095 . 69051) (SETUSERNAME 69053 . 69810))))) + (FILEMAP (NIL (3183 16010 (DELFILE 3193 . 3354) (FULLNAME 3356 . 3723) (INFILE 3725 . 3984) (INFILEP +3986 . 4121) (IOFILE 4123 . 4374) (OPENFILE 4376 . 4679) (OPENSTREAM 4681 . 9021) (OUTFILE 9023 . 9285 +) (OUTFILEP 9287 . 9423) (RENAMEFILE 9425 . 9731) (SIMPLE.FINDFILE 9733 . 10143) (VMEMSIZE 10145 . +10312) (\COPYSYS 10314 . 14605) (\FLUSHVM 14607 . 15679) (\LOGOUT0 15681 . 16008)) (16509 41169 ( +UNPACKFILENAME.STRING 16519 . 38355) (\UPF.DIRECTORY 38357 . 41167)) (42697 45003 (UNPACKFILENAME +42707 . 42893) (LASTCHPOS 42895 . 43589) (FILENAMEFIELD 43591 . 43885) (FILENAMEFIELD.STRING 43887 . +44291) (PACKFILENAME 44293 . 44636) (PACKFILENAME.STRING 44638 . 45001)) (59473 60386 ( +FILEDIRCASEARRAY 59483 . 60384)) (60553 67850 (LOGOUT 60563 . 61608) (MAKESYS 61610 . 63239) (SYSOUT +63241 . 64793) (SAVEVM 64795 . 65595) (HERALD 65597 . 65757) (INTERPRET.REM.CM 65759 . 67473) ( +\USEREVENT 67475 . 67848)) (68032 69759 (USERNAME 68042 . 68998) (SETUSERNAME 69000 . 69757))))) STOP diff --git a/sources/ADIR.LCOM b/sources/ADIR.LCOM index 13cc0d9e..11d3df85 100644 Binary files a/sources/ADIR.LCOM and b/sources/ADIR.LCOM differ