@ESS{[BUGS]} provides 5 features.  First, BUGS syntax is
described to allow for proper fontification of statements,
distributions, functions, commands and comments in BUGS model files,
command files and log files.  Second, @ESS{} creates templates for the
command file from the model file so that a BUGS batch process can be
defined by a single file.  Third, @ESS{} provides a BUGS batch script
that allows @ESS{} to set BUGS batch parameters.  Fourth, key sequences
are defined to create a command file and submit a BUGS batch process.
Lastly, interactive submission of BUGS commands is also supported.

@section ESS[BUGS]--Model files

Model files with the @file{.bug} extension are edited in @ESS{[BUGS]}
mode.  Three keys are bound for your use in @ESS{[BUGS]}, @kbd{F2},
@kbd{C-c C-c} and @kbd{=}.  @kbd{F2} performs the same action as it does
in @ESS{[SAS]}, @xref{ESS(SAS)--Function keys for batch processing}.
@kbd{C-c C-c} performs the function @code{ess-bugs-next-action} which
you will use a lot.  Pressing it in an empty buffer for a model file
will produce a template for you.  @kbd{=} inserts the set operator,
@code{<-}.

@section ESS[BUGS]--Command files

Files ending in @file{.bmd} are used for BUGS command files.  When you
have finished editing your model file and press @kbd{C-c C-c}, a command
file is created if one does not already exist.  When you are finished
editing your command file, pressing @kbd{C-c C-c} again will submit your
command file as a batch job.

@section ESS[BUGS]--Log files

The @file{.bog} extension is used for BUGS log files.  The command line
generated by @ESS{} creates the @file{.bog} transcript file.  

