From 6a09439e3e87191de1fa8bd93fd825d46f32160c Mon Sep 17 00:00:00 2001 From: Mark Harig Date: Mon, 25 Apr 2011 13:56:26 -0400 Subject: [PATCH 2/3] * doc/ref/scheme-scripts.texi (node Guile Scripting): Deleted the menu entry for the section "Invoking Guile." Deleted the node and subsection "Invoking Guile." This node has been moved to the new file 'doc/ref/guile-invoke.texi'. --- doc/ref/scheme-scripts.texi | 173 ------------------------------------------- 1 files changed, 0 insertions(+), 173 deletions(-) diff --git a/doc/ref/scheme-scripts.texi b/doc/ref/scheme-scripts.texi index c7d22a4..7552dba 100644 --- a/doc/ref/scheme-scripts.texi +++ b/doc/ref/scheme-scripts.texi @@ -14,7 +14,6 @@ then tells Guile how to handle the Scheme code. @menu * The Top of a Script File:: How to start a Guile script. -* Invoking Guile:: Command line options understood by Guile. * The Meta Switch:: Passing complex argument lists to Guile from shell scripts. * Command Line Handling:: Accessing the command line from a script. @@ -76,178 +75,6 @@ The rest of the file should be a Scheme program. Guile reads the program, evaluating expressions in the order that they appear. Upon reaching the end of the file, Guile exits. - address@hidden Invoking Guile address@hidden Invoking Guile address@hidden invocation - -Here we describe Guile's command-line processing in detail. Guile -processes its arguments from left to right, recognizing the switches -described below. For examples, see @ref{Scripting Examples}. - address@hidden @code - address@hidden -s @var{script} @var{arg...} -Read and evaluate Scheme source code from the file @var{script}, as the address@hidden function would. After loading @var{script}, exit. Any -command-line arguments @var{arg...} following @var{script} become the -script's arguments; the @code{command-line} function returns a list of -strings of the form @code{(@var{script} @var{arg...})}. - address@hidden -c @var{expr} @var{arg...} -Evaluate @var{expr} as Scheme code, and then exit. Any command-line -arguments @var{arg...} following @var{expr} become command-line arguments; the address@hidden function returns a list of strings of the form address@hidden(@var{guile} @var{arg...})}, where @var{guile} is the path of the -Guile executable. - address@hidden -- @var{arg...} -Run interactively, prompting the user for expressions and evaluating -them. Any command-line arguments @var{arg...} following the @code{--} -become command-line arguments for the interactive session; the address@hidden function returns a list of strings of the form address@hidden(@var{guile} @var{arg...})}, where @var{guile} is the path of the -Guile executable. - address@hidden -L @var{directory} -Add @var{directory} to the front of Guile's module load path. The -given directories are searched in the order given on the command line -and before any directories in the GUILE_LOAD_PATH environment -variable. Paths added here are @emph{not} in effect during execution -of the user's @file{.guile} file. - address@hidden -x @var{extension} -Add @var{extension} to the front of Guile's load extension list -(@pxref{Loading, @code{%load-extensions}}). The specified extensions -are tried in the order given on the command line, and before the default -load extensions. Extensions added here are @emph{not} in effect during -execution of the user's @file{.guile} file. - address@hidden -l @var{file} -Load Scheme source code from @var{file}, and continue processing the -command line. - address@hidden -e @var{function} -Make @var{function} the @dfn{entry point} of the script. After loading -the script file (with @code{-s}) or evaluating the expression (with address@hidden), apply @var{function} to a list containing the program name -and the command-line arguments --- the list provided by the address@hidden function. - -A @code{-e} switch can appear anywhere in the argument list, but Guile -always invokes the @var{function} as the @emph{last} action it performs. -This is weird, but because of the way script invocation works under -POSIX, the @code{-s} option must always come last in the list. - -The @var{function} is most often a simple symbol that names a function -that is defined in the script. It can also be of the form @code{(@@ address@hidden @var{symbol})} and in that case, the symbol is -looked up in the module named @var{module-name}. - -For compatibility with some versions of Guile 1.4, you can also use the -form @code{(symbol ...)} (that is, a list of only symbols that doesn't -start with @code{@@}), which is equivalent to @code{(@@ (symbol ...) -main)}, or @code{(symbol ...) symbol} (that is, a list of only symbols -followed by a symbol), which is equivalent to @code{(@@ (symbol ...) -symbol)}. We recommend to use the equivalent forms directly since they -correspond to the @code{(@@ ...)} read syntax that can be used in -normal code, @xref{Using Guile Modules}. - address@hidden Examples}. - address@hidden -ds -Treat a final @code{-s} option as if it occurred at this point in the -command line; load the script here. - -This switch is necessary because, although the POSIX script invocation -mechanism effectively requires the @code{-s} option to appear last, the -programmer may well want to run the script before other actions -requested on the command line. For examples, see @ref{Scripting -Examples}. - address@hidden \ -Read more command-line arguments, starting from the second line of the -script file. @xref{The Meta Switch}. - address@hidden address@hidden -The option @code{--use-srfi} expects a comma-separated list of numbers, -each representing a SRFI number to be loaded into the interpreter -before starting evaluating a script file or the REPL. Additionally, -the feature identifier for the loaded SRFIs is recognized by -`cond-expand' when using this option. - address@hidden -guile --use-srfi=8,13 address@hidden example - address@hidden --debug -Start with the debugging virtual machine engine. Using the debugging VM -will enable support for VM hooks, which are needed for tracing, -breakpoints, and accurate call counts when profiling. The debugging VM -is slower than the regular VM, though, by about 10 percent. @xref{VM -Hooks}, for more information. - -By default, the debugging VM engine is only used when entering an -interactive session. When executing a script with @code{-s} or address@hidden, the normal, faster VM is used by default. - address@hidden address@hidden --no-debug -Do not use the debugging VM engine, even when entering an interactive -session. - address@hidden -q -Do not the local initialization file, @code{.guile}. This option only -has an effect when running interactively; running scripts does not load -the @code{.guile} file. @xref{Init File}. - address@hidden address@hidden -While this program runs, listen on a local port or a path for REPL -clients. If @var{p} starts with a number, it is assumed to be a local -port on which to listen. If it starts with a forward slash, it is -assumed to be a path to a UNIX domain socket on which to listen. - -If @var{p} is not given, the default is local port 37146. If you look -at it upside down, it almost spells ``Guile''. If you have netcat -installed, you should be able to @kbd{nc localhost 37146} and get a -Guile prompt. Alternately you can fire up Emacs and connect to the -process; see @ref{Using Guile in Emacs} for more details. - -Note that opening a port allows anyone who can connect to that port---in -the TCP case, any local user---to do anything Guile can do, as the user -that the Guile process is running as. Don't use @option{--listen} on -multi-user machines. Of course, if you don't pass @option{--listen} to -Guile, no port will be opened. - -That said, @code{--listen} is great for interactive debugging and -development. - address@hidden - address@hidden --auto-compile -Compile source files automatically (default behavior). - address@hidden - address@hidden --fresh-auto-compile -Treat the auto-compilation cache as invalid, forcing recompilation. - address@hidden - address@hidden --no-auto-compile -Disable automatic source file compilation. - address@hidden - address@hidden address@hidden, }--help -Display help on invoking Guile, and then exit. - address@hidden address@hidden, }--version -Display the current version of Guile, and then exit. - address@hidden table - - @node The Meta Switch @subsection The Meta Switch -- 1.7.4.4