Compatibility with filladapt.
[geiser.git] / README
blobb55b93a8f15dcd7759f617cf003cbd184e39387e
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).
23    NOTE: if you're not in a hurry, Geiser's website
24    (http://www.nongnu.org/geiser/) contains a nicer manual, also
25    included in Geiser tarballs as a texinfo file (doc/geiser.info).
27 * Requirements
29     Geiser needs Emacs 23.2 or better, and at least one of the
30     supported scheme implementations:
31       - Guile 2.0 or better.
32       - PLT Racket 5.0.1 or better.
34 * Installation
35   Geiser can be used either directly from its uninstalled source tree
36   or byte-compiled and installed after perfoming the standard
37   configure/make/make install dance.
39 *** In place
40     - Extract the tarball or clone the git repository anywhere in your
41       file system. Let's call that place <path-to-geiser>.
42     - In your .emacs:
44       (load-file "<path-to-geiser>/elisp/geiser.el")
46 *** Byte-compiled
47     - Create a build directory, `build', say:
48       $ cd <path-to-geiser>
49       $ mkdir build; cd build
50     - Configure and make:
51       $ ../configure && make
53     Now, you can use the byte-compiled Geiser in place by adding to
54     your .emacs:
56     (load "<path-to-geiser>/build/elisp/geiser-load")
58     or, alternatively, install it with:
60     $ make install
62     (you might need to get root access, depending on your installation
63     directory) and, instead of the above load forms, require
64     'geiser-install (not 'geiser, mind you) in your emacs
65     initialization file:
67     (require 'geiser-install)
69     You're ready to go!
71 * Basic configuration
72   The loading invocations above install all supported Scheme
73   implementations. You can list explicitly the ones that you want by
74   setting the variable `geiser-impl-installed-implementations' *before*
75   loading geiser.el. For instance:
77   (setq geiser-impl-installed-implementations '(racket guile))
79    On opening a scheme file, Geiser will try to guess its Scheme,
80    defaulting to the first in the list. Use `C-c C-s' to select the
81    implementation by hand (on a per file basis).
83   Check the geiser customization group for some options with:
85       M-x customize-group RET geiser RET
87   In particular, customize `geiser-<impl>-binary', which should point
88   to an executable in your path.
90   To start a REPL, M-x geiser.
92 *** Completion with company-mode
93     Geiser offers identifier and module name completion, bound to
94     M-TAB and M-` respectively. Only names visible in the current
95     module are offered.
97     While that is cool and all, things are even better: if you have
98     company-mode (http://nschum.de/src/emacs/company-mode/) installed,
99     Geiser's completion will use it. Just require company-mode and,
100     from then on, any new scheme buffer or REPL will use it. If you
101     didn't know about Nikolaj Schumacher's awesome mode, check this
102     screencast: http://goo.gl/yxLQ.
104 * Quick key reference
106 *** In Scheme buffers:
108     |-------------+-------------------------------------------------|
109     | C-c C-z     | Switch to REPL                                  |
110     | C-c C-a     | Switch to REPL and current module               |
111     | C-c C-s     | Specify Scheme implementation for buffer        |
112     |-------------+-------------------------------------------------|
113     | M-.         | Go to definition of identifier at point         |
114     | M-,         | Go back to where M-. was last invoked           |
115     | C-c C-e m   | Ask for a module and open its file              |
116     | C-c C-e C-l | Add a given directory to Scheme's load path     |
117     | C-c C-e [   | Toggle between () and [] for current form       |
118     |-------------+-------------------------------------------------|
119     | C-M-x       | Eval definition around point                    |
120     | C-c M-e     | Eval definition around point and switch to REPL |
121     | C-x C-e     | Eval sexp before point                          |
122     | C-c C-r     | Eval region                                     |
123     | C-c M-r     | Eval region and switch to REPL                  |
124     |-------------+-------------------------------------------------|
125     | C-c C-m x   | Macro-expand definition around point            |
126     | C-c C-m e   | Macro-expand sexp before point                  |
127     | C-c C-m r   | Marcro-expand region                            |
128     |-------------+-------------------------------------------------|
129     | C-c C-k     | Compile and load current file                   |
130     |-------------+-------------------------------------------------|
131     | C-c C-d d   | See documentation for identifier at point       |
132     | C-c C-d s   | See short documentation for identifier at point |
133     | C-c C-d i   | Look up manual for identifier at point          |
134     | C-c C-d m   | See a list of a module's exported identifiers   |
135     | C-c C-d a   | Toggle autodoc mode                             |
136     |-------------+-------------------------------------------------|
137     | C-c <       | Show callers of procedure at point              |
138     | C-c >       | Show callees of procedure at point              |
139     |-------------+-------------------------------------------------|
140     | M-TAB       | Complete identifier at point                    |
141     | M-`, C-.    | Complete module name at point                   |
142     | TAB         | Complete identifier at point or indent          |
143     |             | (If `geiser-mode-smart-tab-p' is t)             |
144     |-------------+-------------------------------------------------|
146 *** In the REPL
148     |-------------+----------------------------------------------------|
149     | C-c C-z     | Start Scheme REPL, or jump to previous buffer      |
150     | C-c C-q     | Kill Scheme process                                |
151     | C-c C-k     | Nuke REPL: use it if the REPL becomes unresponsive |
152     |-------------+----------------------------------------------------|
153     | M-.         | Edit identifier at point                           |
154     | TAB, M-TAB  | Complete identifier at point                       |
155     | M-`, C-.    | Complete module name at point                      |
156     | M-p, M-n    | Prompt history, matching current prefix            |
157     |-------------+----------------------------------------------------|
158     | C-c C-m     | Set current module                                 |
159     | C-c C-i     | Import module into current namespace               |
160     | C-c C-r     | Add a given directory to scheme's load path        |
161     |-------------+----------------------------------------------------|
162     | C-c C-d C-d | See documentation for symbol at point              |
163     | C-c C-d C-m | See documentation for module                       |
164     | C-c C-d C-a | Toggle autodoc mode                                |
165     |-------------+----------------------------------------------------|
167 *** In the documentation browser:
169     |----------+----------------------------------------------|
170     | f        | Next page                                    |
171     | b        | Previous page                                |
172     |----------+----------------------------------------------|
173     | TAB, n   | Next link                                    |
174     | S-TAB, p | Previous link                                |
175     | N        | Next section                                 |
176     | P        | Previous section                             |
177     |----------+----------------------------------------------|
178     | k        | Kill current page and go to previous or next |
179     | g, r     | Refresh page                                 |
180     | c        | Clear browsing history                       |
181     |----------+----------------------------------------------|
182     | ., M-.   | Edit identifier at point                     |
183     | z        | Switch to REPL                               |
184     |----------+----------------------------------------------|
185     | q        | Bury buffer                                  |
186     |----------+----------------------------------------------|
188 *** In backtrace (evaluation/compile result) buffers:
190     - M-g n, M-g p, C-x ` for error navigation.
191     - q to bury buffer.