#+TITLE: MU SCM
#+MAN_CLASS_OPTIONS: :section-id "@SECTION_ID@" :date "@MAN_DATE@"
#+include: macros.inc

* NAME

mu-scm - bindings and shell for the GNU Guile programming language.

* SYNOPSIS

*mu scm* [​_COMMON-OPTIONS_​]

starts the GNU Guile shell.

*mu scm* [​_COMMON-OPTIONS_​] [[​_COMMAND_​] -- [​_COMMAND-OPTIONS_​]]

runs a GNU Guile script.

* DESCRIPTION

*mu scm* is the command to use the bindings to the GNU Guile programming language.
It can either open a shell ("REPL") or run scripts.

Using *mu scm*, you can script *mu*.

* SCM OPTIONS

** --listen

With the ~--listen~ parameter, *mu scm* starts listening on a UNIX domain socket.
This can be used for communicating with the REPL using some external tool, such
as Emacs with the "Geiser" package. For details, refer to the *mu-scm* Info
manual.

It blocks after printing the name of the socket (which is a randomized name),
prefixed by *UNIX_CONNECT:* and ending with a newline. For instance:
#+begin_example
UNIX-CONNECT:/run/user/1000/mu-scm-socket-4eb5db40
#+end_example

** --eval

With the ~--eval~ option you can evaluate an expression in mu/scm environment. For
example:
#+begin_example
$ mu scm --eval '(format #t "found ~d match(es)\n" (length (mfind "hello")))'
found 7173 match(es)
#+end_example

#+include: "muhome.inc" :minlevel 2

#+include: "common-options.inc" :minlevel 1

#+include: "exit-code.inc" :minlevel 1

* ENVIRONMENT

By default, *mu scm* expects its internal files to be found in
~<prefix>/share/mu/scm~. However, for development/testing you can set the
environment variable *MU_SCM_DIR* to some alternative directory.

* SEE ALSO

The full documentation for *mu scm* is maintained as a Texinfo manual. If the *info*
and *mu* programs are properly installed at your site, the command *info mu-scm*
should give you access to the complete manual.

http://www.schemers.org provides a general introduction to the Scheme language.

{{{man-link(emacs,1)}}}

#+include: "prefooter.inc" :minlevel 1
