Fixing guile 2.2 compatibility
[geiser.git] / README
blob69b34be1d2911fe3d1d41dee1f49c3d995843422
1 * Overview
3   Geiser is a generic Emacs/Scheme interaction mode, featuring an
4   enhanced REPL and a set of minor modes improving Emacs' basic scheme
5   major mode. The main functionalities provided are:
7     - Evaluation of forms in the namespace of the current module.
8     - Macro expansion.
9     - File/module loading.
10     - Namespace-aware identifier completion (including local bindings,
11       names visible in the current module, and module names).
12     - Autodoc: the echo area shows information about the signature of
13       the procedure/macro around point automatically.
14     - Jump to definition of identifier at point.
15     - Access to documentation (including docstrings when the
16       implementation provides it).
17     - Listings of identifiers exported by a given module.
18     - Listings of callers/callees of procedures.
19     - Rudimentary support for debugging (list of
20       evaluation/compilation error in an Emacs' compilation-mode
21       buffer).
22     - Support for inline images in schemes, such as Racket, that treat
23       them as first order values.
25    NOTE: if you're not in a hurry, Geiser's website
26    (http://www.nongnu.org/geiser/) contains a nicer manual, also
27    included in Geiser tarballs as a texinfo file (doc/geiser.info).
29 * Requirements
31     Geiser needs Emacs 23.2 or better, and at least one of the
32     supported scheme implementations:
33       - Guile 2.0 or better.
34       - PLT Racket 6.0 or better.
35       - Chicken 4.8.0 or better.
37 * Installation
39   The easiest way is to use ELPA/Marmalade, and just type
40   `M-x install-package RET geiser` inside emacs.
42   Geiser can be used either directly from its uninstalled source tree
43   or byte-compiled and installed after performing the standard
44   configure/make/make install dance.  See the INSTALL file for more details.
46 ** Chicken Addendum
47     These steps are necessary to fully support Chicken Scheme, but are
48     not required for any other scheme.
50     - Install the necessary support eggs:
51       $ chicken-install -s apropos chicken-doc
52     - Update the Chicken documentation database:
53       $ cd `csi -p '(chicken-home)'`
54       $ curl http://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
56 * Basic configuration
58   The loading invocations above install all supported Scheme
59   implementations. You can list explicitly the ones that you want by
60   setting the variable `geiser-active-implementations' *before*
61   loading geiser.el. For instance:
63   (setq geiser-active-implementations '(chicken guile))
65    On opening a scheme file, Geiser will try to guess its Scheme,
66    defaulting to the first in the list. Use `C-c C-s' to select the
67    implementation by hand (on a per file basis).
69   Check the geiser customization group for some options with:
71       M-x customize-group RET geiser RET
73   In particular, customize `geiser-<impl>-binary', which should point
74   to an executable in your path.
76   To start a REPL, M-x geiser.
78 ** Completion with company-mode
80     Geiser offers identifier and module name completion, bound to
81     M-TAB and M-` respectively. Only names visible in the current
82     module are offered.
84     While that is cool and all, things are even better: if you have
85     company-mode (http://company-mode.github.io/) installed,
86     Geiser's completion will use it. Just require company-mode and,
87     from then on, any new scheme buffer or REPL will use it.
89 * Quick key reference
91 ** In Scheme buffers:
93     |-------------+-------------------------------------------------|
94     | C-c C-z     | Switch to REPL                                  |
95     | C-c C-a     | Switch to REPL and current module               |
96     | C-c C-s     | Specify Scheme implementation for buffer        |
97     |-------------+-------------------------------------------------|
98     | M-.         | Go to definition of identifier at point         |
99     | M-,         | Go back to where M-. was last invoked           |
100     | C-c C-e m   | Ask for a module and open its file              |
101     | C-c C-e C-l | Add a given directory to Scheme's load path     |
102     | C-c C-e [   | Toggle between () and [] for current form       |
103     |-------------+-------------------------------------------------|
104     | C-M-x       | Eval definition around point                    |
105     | C-c M-e     | Eval definition around point and switch to REPL |
106     | C-x C-e     | Eval sexp before point                          |
107     | C-c C-r     | Eval region                                     |
108     | C-c M-r     | Eval region and switch to REPL                  |
109     | C-c C-b     | Eval buffer                                     |
110     | C-c M-b     | Eval buffer and switch to REPL                  |
111     |-------------+-------------------------------------------------|
112     | C-c C-m x   | Macro-expand definition around point            |
113     | C-c C-m e   | Macro-expand sexp before point                  |
114     | C-c C-m r   | Macro-expand region                             |
115     |-------------+-------------------------------------------------|
116     | C-c C-k     | Compile and load current file                   |
117     |-------------+-------------------------------------------------|
118     | C-c C-d d   | See documentation for identifier at point       |
119     | C-c C-d s   | See short documentation for identifier at point |
120     | C-c C-d i   | Look up manual for identifier at point          |
121     | C-c C-d m   | See a list of a module's exported identifiers   |
122     | C-c C-d a   | Toggle autodoc mode                             |
123     |-------------+-------------------------------------------------|
124     | C-c <       | Show callers of procedure at point              |
125     | C-c >       | Show callees of procedure at point              |
126     |-------------+-------------------------------------------------|
127     | M-TAB       | Complete identifier at point                    |
128     | M-`, C-.    | Complete module name at point                   |
129     | TAB         | Complete identifier at point or indent          |
130     |             | (If `geiser-mode-smart-tab-p' is t)             |
131     |-------------+-------------------------------------------------|
133 ** In the REPL
135     |-------------+----------------------------------------------------|
136     | C-c C-z     | Start Scheme REPL, or jump to previous buffer      |
137     | C-c M-o     | Clear scheme output                                |
138     | C-c C-q     | Kill Scheme process                                |
139     | C-c C-k     | Nuke REPL: use it if the REPL becomes unresponsive |
140     |-------------+----------------------------------------------------|
141     | M-.         | Edit identifier at point                           |
142     | TAB, M-TAB  | Complete identifier at point                       |
143     | M-`, C-.    | Complete module name at point                      |
144     | M-p, M-n    | Prompt history, matching current prefix            |
145     |-------------+----------------------------------------------------|
146     | C-c C-m     | Set current module                                 |
147     | C-c C-i     | Import module into current namespace               |
148     | C-c C-r     | Add a given directory to scheme's load path        |
149     |-------------+----------------------------------------------------|
150     | C-c C-d C-d | See documentation for symbol at point              |
151     | C-c C-d C-m | See documentation for module                       |
152     | C-c C-d C-a | Toggle autodoc mode                                |
153     |-------------+----------------------------------------------------|
155 ** In the documentation browser:
157     |----------+----------------------------------------------|
158     | f        | Next page                                    |
159     | b        | Previous page                                |
160     |----------+----------------------------------------------|
161     | TAB, n   | Next link                                    |
162     | S-TAB, p | Previous link                                |
163     | N        | Next section                                 |
164     | P        | Previous section                             |
165     |----------+----------------------------------------------|
166     | k        | Kill current page and go to previous or next |
167     | g, r     | Refresh page                                 |
168     | c        | Clear browsing history                       |
169     |----------+----------------------------------------------|
170     | ., M-.   | Edit identifier at point                     |
171     | z        | Switch to REPL                               |
172     |----------+----------------------------------------------|
173     | q        | Bury buffer                                  |
174     |----------+----------------------------------------------|
176 ** In backtrace (evaluation/compile result) buffers:
178     - M-g n, M-g p, C-x ` for error navigation.
179     - q to bury buffer.