summaryrefslogtreecommitdiff
path: root/man/mu-scm.1.org
blob: 20ef5ae5d379dde6e03cbd0007f2e509a15af6d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#+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>/hare/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