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.
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
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 * Supported scheme implementations
29 - Guile 2.0 (not released yet: use the latest git master branch).
30 - PLT Racket 5.0.1 or better.
33 Geiser can be used either directly from its uninstalled source tree
34 or byte-compiled and installed after perfoming the standard
35 configure/make/make install dance.
38 - Extract the tarball or clone the git repository anywhere in your
39 file system. Let's call that place <path-to-geiser>.
42 (load-file "<path-to-geiser>/elisp/geiser.el")
45 - Create a build directory, `build', say:
47 $ mkdir build; cd build
49 $ ../configure && make
51 Now, you can use the byte-compiled Geiser in place by adding to
54 (load "<path-to-geiser>/build/elisp/geiser-load")
56 or, alternatively, install it with:
60 (you might need to get root access, depending on your installation
61 directory) and, instead of the above load forms, require
62 'geiser-install (not 'geiser, mind you) in your emacs
65 (require 'geiser-install)
70 The loading invocations above install all supported Scheme
71 implementations. You can list explicitly the ones that you want by
72 setting the variable `geiser-impl-installed-implementations' *before*
73 loading geiser.el. For instance:
75 (setq geiser-impl-installed-implementations '(racket guile))
77 On opening a scheme file, Geiser will try to guess its Scheme,
78 defaulting to the first in the list. Use `C-c C-s' to select the
79 implementation by hand (on a per file basis).
81 Check the geiser customization group for some options with:
83 M-x customize-group RET geiser RET
85 In particular, customize `geiser-<impl>-binary', which should point
86 to an executable in your path.
88 To start a REPL, M-x geiser.
90 *** Completion with company-mode
91 Geiser offers identifier and module name completion, bound to
92 M-TAB and M-` respectively. Only names visible in the current
95 While that is cool and all, things are even better: if you have
96 company-mode (http://nschum.de/src/emacs/company-mode/) installed,
97 Geiser's completion will use it. Just require company-mode and,
98 from then on, any new scheme buffer or REPL will use it. If you
99 didn't know about Nikolaj Schumacher's awesome mode, check this
100 screencast: <http://goo.gl/yxLQ>.
102 * Quick key reference
104 *** In Scheme buffers:
106 |---------------------+-------------------------------------------------|
107 | C-c C-z | Switch to REPL |
108 | C-u C-c C-z | Switch to REPL and current module |
109 | C-c C-s | Specify Scheme implementation for buffer |
110 |---------------------+-------------------------------------------------|
111 | M-. | Go to definition of identifier at point |
112 | M-, | Go back to where M-. was last invoked |
113 | C-c C-e m | Ask for a module and open its file |
114 |---------------------+-------------------------------------------------|
115 | C-M-x | Eval definition around point |
116 | C-c M-e | Eval definition around point and switch to REPL |
117 | C-x C-e | Eval sexp before point |
118 | C-c C-r | Eval region |
119 | C-c M-r | Eval region and switch to REPL |
120 |---------------------+-------------------------------------------------|
121 | C-c C-m x | Macro-expand definition around point |
122 | C-c C-m e | Macro-expand sexp before point |
123 | C-c C-m r | Marcro-expand region |
124 |---------------------+-------------------------------------------------|
125 | C-c C-k | Compile and load current file |
126 |---------------------+-------------------------------------------------|
127 | C-c C-d d | See documentation for identifier at point |
128 | C-c C-d m | See a list of a module's exported identifiers |
129 | C-c C-d a | Toggle autodoc mode |
130 |---------------------+-------------------------------------------------|
131 | C-c< | Show callers of procedure at point |
132 | C-c> | Show callees of procedure at point |
133 |---------------------+-------------------------------------------------|
134 | M-TAB | Complete identifier at point |
135 | M-`, C-. | Complete module name at point |
136 | TAB | Complete identifier at point or indent |
137 | | (If `geiser-mode-smart-tab-p' is t) |
138 |---------------------+-------------------------------------------------|
142 |-------------+----------------------------------------------------|
143 | C-c C-z | Start Scheme REPL, or jump to previous buffer |
144 | C-c C-q | Kill Scheme process |
145 | C-c C-k | Nuke REPL: use it if the REPL becomes unresponsive |
146 |-------------+----------------------------------------------------|
147 | M-. | Edit identifier at point |
148 | TAB, M-TAB | Complete identifier at point |
149 | M-`, C-. | Complete module name at point |
150 | M-p, M-n | Prompt history, matching current prefix |
151 |-------------+----------------------------------------------------|
152 | C-c C-m | Set current module |
153 | C-c C-i | Import module into current namespace |
154 |-------------+----------------------------------------------------|
155 | C-c C-d C-d | See documentation for symbol at point |
156 | C-c C-d C-m | See documentation for module |
157 | C-c C-d C-a | Toggle autodoc mode |
158 |-------------+----------------------------------------------------|
160 *** In the documentation browser:
162 |------------+----------------------------------------------|
164 | p, b | Previous page |
165 | TAB, S-TAB | Next/previous link |
166 |------------+----------------------------------------------|
167 | k | Kill current page and go to previous or next |
168 | g, r | Refresh page |
169 | c | Clear browsing history |
170 |------------+----------------------------------------------|
171 | ., M-. | Edit identifier at point |
172 | z | Switch to REPL |
173 |------------+----------------------------------------------|
175 |------------+----------------------------------------------|
177 *** In backtrace (evaluation/compile result) buffers:
179 - M-g n, M-g p, C-x ` for error navigation.