4 Geiser is a generic Emacs/Scheme interaction mode, featuring an
5 enhanced REPL and a set of minor modes improving Emacs' basic scheme
6 major mode. The main functionalities provided are:
8 - Evaluation of forms in the namespace of the current module.
10 - File/module loading.
11 - Namespace-aware identifier completion (including local bindings,
12 names visible in the current module, and module names).
13 - Autodoc: the echo area shows information about the signature of
14 the procedure/macro around point automatically.
15 - Jump to definition of identifier at point.
16 - Access to documentation (including docstrings when the
17 implementation provides it).
18 - Listings of identifiers exported by a given module.
19 - Listings of callers/callees of procedures.
20 - Rudimentary support for debugging (list of
21 evaluation/compilation error in an Emacs' compilation-mode
24 NOTE: if you're not in a hurry, [[http://www.nongnu.org/geiser/][Geiser's website]] contains a nicer
25 manual, also included in Geiser tarballs as a texinfo file
28 * Supported scheme implementations
30 - Guile 2.0 (not released yet: use the latest git master branch).
31 - PLT Racket 5.0.1 or better.
34 Geiser can be used either directly from its uninstalled source tree
35 or byte-compiled and installed after perfoming the standard
36 configure/make/make install dance.
39 - Extract the tarball or clone the git repository anywhere in your
40 file system. Let's call that place <path-to-geiser>.
43 #+BEGIN_SRC emacs-lisp
44 (load-file "<path-to-geiser>/elisp/geiser.el")
48 - Create a build directory, `build', say:
51 $ mkdir build; cd build
55 $ ../configure && make
58 Now, you can use the byte-compiled Geiser in place by adding to
61 #+BEGIN_SRC emacs-lisp
62 (load "<path-to-geiser>/build/elisp/geiser-load")
65 or, alternatively, install it with:
71 (you might need to get root access, depending on your installation
72 directory) and, instead of the above load forms, require
73 'geiser-install (not 'geiser, mind you) in your emacs
76 #+BEGIN_SRC emacs-lisp
77 (require 'geiser-install)
83 The loading invocations above install all supported Scheme
84 implementations. You can list explicitly the ones that you want by
85 setting the variable `geiser-impl-installed-implementations' *before*
86 loading geiser.el. For instance:
88 #+BEGIN_SRC emacs-lisp
89 (setq geiser-impl-installed-implementations '(racket guile))
92 On opening a scheme file, Geiser will try to guess its Scheme,
93 defaulting to the first in the list. Use `C-c C-s' to select the
94 implementation by hand (on a per file basis).
96 Check the geiser customization group for some options with:
98 M-x customize-group RET geiser RET
100 In particular, customize `geiser-<impl>-binary', which should point
101 to an executable in your path.
103 To start a REPL, M-x geiser.
105 *** Completion with company-mode
106 Geiser offers identifier and module name completion, bound to
107 M-TAB and M-` respectively. Only names visible in the current
110 While that is cool and all, things are even better: if you have
111 [[http://nschum.de/src/emacs/company-mode/][company-mode]] installed, Geiser's completion will use it. Just
112 require company-mode and, from then on, any new scheme buffer or
113 REPL will use it. If you didn't know about Nikolaj Schumacher's
114 awesome mode, check [[http://www.screentoaster.com/watch/stU0lSRERIR1pYRFVdXVlRVFFV/company_mode_for_gnu_emacs][this screencast]].
116 * Quick key reference
118 *** In Scheme buffers:
120 |---------------------+-------------------------------------------------|
121 | C-c C-z | Switch to REPL |
122 | C-u C-c C-z | Switch to REPL and current module |
123 | C-c C-s | Specify Scheme implementation for buffer |
124 | M-. | Go to definition of identifier at point |
125 | M-, | Go back to where M-. was last invoked |
126 | C-c C-e m | Ask for a module and open its file |
127 | C-M-x | Eval definition around point |
128 | C-c M-e | Eval definition around point and switch to REPL |
129 | C-x C-e | Eval sexp before point |
130 | C-c C-r | Eval region |
131 | C-c M-r | Eval region and switch to REPL |
132 | C-c C-m x | Macro-expand definition around point |
133 | C-c C-m e | Macro-expand sexp before point |
134 | C-c C-m r | Marcro-expand region |
135 | C-u C-c C-m [x,e,r] | (With prefix, macro expansions are recursive) |
136 | C-c C-k | Compile and load current file |
137 | C-c C-l | Load current file |
138 | C-c C-d d | See documentation for identifier at point |
139 | C-c C-d m | See a list of a module's exported identifiers |
140 | C-c C-d a | Toggle autodoc mode |
141 | C-c< | Show callers of procedure at point |
142 | C-c> | Show callees of procedure at point |
143 | C-c C-x f | See a generic's methods signatures |
144 | M-TAB | Complete identifier at point |
145 | M-`, C-. | Complete module name at point |
146 | TAB | Complete identifier at point or indent |
147 | | (If `geiser-mode-smart-tab-p' is t) |
148 |---------------------+-------------------------------------------------|
152 |-------------+----------------------------------------------------|
153 | C-c C-z | Start Scheme REPL, or jump to previous buffer |
154 | C-c C-q | Kill Scheme process |
155 | M-. | Edit identifier at point |
156 | TAB, M-TAB | Complete identifier at point |
157 | M-`, C-. | Complete module name at point |
158 | M-p, M-n | Prompt history, matching current prefix |
159 | C-c C-k | Nuke REPL: use it if the REPL becomes unresponsive |
160 | C-c C-m | Set current module |
161 | C-c C-i | Import module into current namespace |
162 | C-c C-l | Load scheme file |
163 | C-c C-d C-d | See documentation for symbol at point |
164 | C-c C-d C-m | See documentation for module |
165 | C-c C-d C-a | Toggle autodoc mode |
166 |-------------+----------------------------------------------------|
168 *** In the documentation browser:
170 |------------+----------------------------------------------|
172 | p, b | Previous page |
173 | TAB, S-TAB | Next/previous link |
174 | k | Kill current page and go to previous or next |
175 | g, r | Refresh page |
176 | c | Clear browsing history |
177 | ., M-. | Edit identifier at point |
178 | z | Switch to REPL |
180 |------------+----------------------------------------------|
182 *** In backtrace (evaluation/compile result) buffers:
184 - TAB, M-TAB for error navigation.