                             Quick Reference for
                   The Soar Development Environment (SDE)
                              $Revision: 1.6 $
To start Soar:

    ESC x soar

History commands in Soar process buffers:

    cycle backward through input history            ESC p 
    cycle forward through input history             ESC n
    search backward for input matching prefix       ESC s

Input editing commands in Soar process buffers:

    erase input typed so far                        C-c C-u
    erase the last word of input typed              C-c C-w
    erase last batch of output                      C-c C-o

Movement commands in Soar process buffer:

    show last batch of output, with cursor at top   C-c C-r
    move backward to previous prompt in output      C-c <
    move forward to next prompt in output           C-c >

General Soar commands:

    load file           C-c C-l     init-soar       C-c 0
    go                  C-c .       matches 1       C-c '
    schedule            C-c ,       matches 2       C-c "
    print               C-c C-p     preferences     C-c /
    excise              C-c C-x     wm              C-c C-y
    ^C interrupt        C-c C-c     firing-counts   C-c C-q

    Many of the standard Soar commands take optional arguments.  Giving a
    prefix argument (such as `C-u') to most commands makes them prompt for
    the arguments.  Optional arguments are remembered on history lists.
    Typing `ESC p' and `ESC n' at an argument prompt moves backward and
    forward through the history.  Optional arguments are automatically reused
    upon subsequent invocations of a command until they are changed.  This
    allows you to set an option and then apply a command repeatedly to
    different target arguments without having to respecify the optional
    arguments each time.

    To set the default value of a command's optional arguments, set one of
    these variables to a string containing the desired argument:

    sde-go-args       sde-preferences-args         sde-print-args
    sde-run-args      sde-list-productions-args    sde-firing-counts-args
    sde-matches-args  sde-list-chunks-args         sde-agent-go-args
    sde-ms-args       sde-list-justifications-args sde-schedule-args

    The default optional arguments are reset to these values when Soar restarts.

Tracing and breaking:

    ptrace the production under the cursor          C-c C-t
    pbreak the production under the cursor          C-c C-b

    If given a prefix argument (`C-u'), they undo the action of a ptrace or
    pbreak on the production under the cursor.  If given a negative argument
    (`ESC -'), they undo all ptraces or pbreaks.  To list the currently active
    ptraces or pbreaks, use `C-c C-v t' and `C-c C-v b' (see below).

Viewing various information:

    Each of these commands puts the results in a separate window, if 
    variable sde-soar-use-output-buffer is non-nil.

    view ptraces                                    C-c C-v t
    view pbreaks                                    C-c C-v b
    view goal stack (pgs)                           C-c C-v g
    view match set (ms)                             C-c C-v m
    view Soar stats (all stats combined)            C-c C-v s
    view chunks                                     C-c C-v c
    view productions                                C-c C-v p
    view justifications                             C-c C-v j
    view Soar WM (do like 'print (* ^ * *)')        C-c C-v w

Finding productions:

    This uses several heuristics to locate productions: (1) search through
    existing Emacs buffers that are in SDE mode; (2) if fail and a tag file
    exists, do tags search; (3) if fail, search through files known to have
    been loaded into Soar; (4) if fail, search through files found in
    directories of Soar files that have been loaded or visited so far.

    find production whose name is under cursor      C-c C-f      or ESC .
    find production w/ name containing given string C-u C-c C-f  or C-u ESC .
    find next production                            C-c C-n      or ESC ,

Multi agent commands:

    SDE Soar Mode automatically determines whether Soar was started in
    multi-agent mode.  The following commands are only available then:

    create-agents                                   C-c C-a c
    agent-go for the current buffer's agent         C-c C-a g
    select-agent                                    C-c C-a s

Additional commands available when editing files:

    evaluate production under cursor                C-c C-e
    evaluate and switch                             C-u C-c C-e
    switch to Soar process buffer                   C-c C-z
    
    evaluate region in buffer                       C-c C-r e
    excise every production in region               C-c C-r x
    pbreak every production in region               C-c C-r b
    ptrace every production in region               C-c C-r t
    comment region                                  C-c C-r ;    or  C-c ;

    close all parentheses and indent current form   C-c ]
    find unbalanced parens in buffer                C-c )

    smart reindent                                  ESC q
    smart reposition window                         ESC C-r

General movement commands:

    move to beginning of production                 ESC C-a
    move to end of production                       ESC C-e

Other commands:

    excise a file of productions                    ESC x excise-file

Mouse buttons for use with the X Window System:

    Button                Action
    ----------------      ---------------------------------------------
    shift-left            Execute Soar "print" on item under cursor
    shift-middle          Execute Soar "matches" on item under cursor
    shift-right           Find source code for production name under cursor
    
    meta-control-left     Send to Soar the production under cursor
    meta-control-middle   Execute Soar "ptrace" on production under cursor
    meta-control-right    Execute SDE "pbreak" on production under cursor
