Help for Poplog Command Tool - GetPoplog/Seed GitHub Wiki

Usage: poplog [action-word] [options] [file(s)]

This poplog "commander" runs various Poplog commands (pop11, prolog, etc) with
the special environment variables and $PATH they require. The 'action-word'
determines what command is actually invoked.

INTERPRETER ACTIONS

poplog (pop11|prolog|clisp|pml) [OPTION]...
poplog (pop11|prolog|clisp|pml) [OPTION]... [FILE]
poplog (pop11|prolog|clisp|pml) [OPTION]... :[EXPRESSION]
poplog (pop11|prolog|clisp|pml) [OPTION]... [VEDCOMMAND] [FILE]...

    Poplog supports four different languages out of the box: Pop11,
    Prolog, Common Lisp and Standard ML specified by one of the
    commands pop11, prolog, clisp or pml respectively. All of these take
    options that control their start-up. Note that these options start
    with a '%' character.

     %x
     %x ( X Toolkit options )
        Initiates a connection with the X server by calling sysxsetup.
        You can supply standard X Toolkit options by placing them in
        parentheses after the %x.

     %noinit
        Suppresses compilation of the "init.p" file and any init files
        used by Ved or other subsystems.

     %nobanner
         Suppress printing of the Poplog banner.

    These interpreter commands (pop11, prolog, clisp, pml) have four different 
    argument-patterns:

    1. If no other arguments are given, this will start a read-eval-print loop
    (REPL) in the specified language. For example:

        % poplog pop11

        Sussex Poplog (Version 16.0001 Thu 12 Aug 00:47:01 BST 2021)
        Copyright (c) 1982-1999 University of Sussex. All rights reserved.

        Setpop
        : 


    2. If a file argument is given, this will start Poplog in the specified
    language, load and run the file and then exit. This implies --noinit.

    3. If a file-like argument starting with a ':' is found, it is treated as
    an expression, executed and then Poplog exits.

    4. When a VEDCOMMAND argument is supplied it causes Poplog to go straight
    into the editor (Ved) and can be any of the following: ved, im, help, ref,
    teach. For example:

        % poplog clisp im  # Starts Poplog's immediate mode in Common Lisp.


POP-11 SHORTHAND ACTIONS

poplog [OPTION]...
    Starts up in Pop-11. Same as: poplog pop11

poplog [OPTION]... ved [FILE]...
    Opens the listed files in the editor. Same as: 
    
        % poplog [OPTION]... pop11 ved [FILE]...

poplog [OPTION]... xved [FILE]...
    Opens the listed files in the X-Windows editor (XVed).
    Same as: 
    
        % poplog [OPTION]... pop11 xved [FILE]...

poplog [OPTION]... im [FILE]
    Open an immediate mode window on the FILE, if supplied, or a temporary
    file. Same as: 
    
        % poplog [OPTION]... pop11 im [FILE]

poplog [OPTION]... (help|teach|doc|ref) [TOPIC]
    Searches for the named TOPIC using the relevant documentation sections.
    If found opens a buffer in the editor and otherwise drops into a REPL.


MODES

poplog --run [OPTION]...
    This option forces the Poplog to use the pre-set defaults for all 
    environment variables and also to ignore $poplib. This makes it suitable
    for use in scripts, where the environment is standardised and per
    user customisation is not enabled. The remaining arguments are processed
    as usual.

poplog --dev [OPTION]...
    This option allows Poplog to inherit all existing special environment
    variables and runs the $poplib/init.p and $poplib/vedinit.p. This is the
    normal mode for programming in Poplog. It is not normally necessary to
    supply this option.

poplog --gui=(motif|xt) [OPTION]...
poplog --no-gui [OPTION]...
    Poplog can be used with an X-windows graphical user interface (GUI)
    or simply inside a terminal (`--no-gui`). The GUI look-and-feel can either 
    use the Motif toolkit (--gui=motif) or a much plainer X-toolkit style 
    (`--gui=xt`). This completely changes the appearance of VED, the built-in
    editor, for example.

    Because Poplog's saved-images are always made relative to a base 
    executable, experienced programmers do need to be aware that these options 
    select between different 'editions' of Poplog, which share the vast majority 
    of files but have their own $popsys folder, where their specialised 
    executables are kept.

    As a consequence, if you make a saved image with one 'edition' of Poplog
    you have to restore it with the same edition. 
    
    If neither `--gui` nor `--no-gui` are specified then the default depends 
    on whether poplog is being run interactively (--dev) or as a script (--run).
    In interactive mode, the environment variable $POPLOG_GUI_OPTION is checked, 
    which should have one of the options as its value: `--no-gui`, `--gui=xt` 
    or `--gui=motif`. Otherwise it falls back to `gui=motif`.

    When poplog is being run as a script (--run) then the default is `--no-gui`
    (run without X-windows).


UTILITY ACTIONS

poplog --help
    A special case that shows this usage information.

poplog --version
    Show version information for GetPoplog and the base Poplog system on 
    standard output and exits successfully.

poplog [NAME=VALUE]... [COMMAND [ARG]...]
    Adds/modifies environment variables in the Poplog environment for the
    duration of COMMAND and processes the remainder of the arguments normally. 
    Note: these bindings will correctly override the default bindings 
    established by the `--run` option. This is achieved by running them after
    the default bindings are set up.

poplog exec [PROGRAM] [ARG]...
    Runs an arbitrary program in the Poplog environment i.e. with the special
    environment variables and $PATH set up. A typical use of this is

        % poplog exec bash      # Enter a shell to check the $PATH
        > which mkflavours
        /usr/local/poplog/current_usepop/pop/com/mkflavours

poplog shell [OPTIONS] [FILE]
    Starts a shell in the Poplog environment. The $SHELL environment 
    variable is used to select the shell to be launched. Arguments are
    passed to the shell in the normal way.


COMPILING AND LINKING WITH POPC

poplog popc [OPTION]... [FILE]
poplog poplink [OPTION_OR_FILE]...
poplog poplibr [OPTION] [W-LIBRARY] [W-FILE]...
    Runs the specialised compiler and linking commands. See the in-editor
    help on these commands.

        % poplog help popc