Syntax error fixed
[geiser.git] / doc / intro.texi
blob00207cd7eed10d98939adea979a1bf25cf5c6d94
1 @node Introduction, Installation, Top, Top
2 @chapter Introduction
4 Geiser is an Emacs environment to hack and have fun in Scheme.  If that's
5 enough for you, see @ref{Installation} to get it running and
6 @ref{The REPL} for the fun part.
8 @menu
9 * Modus operandi::
10 * Showing off::
11 @end menu
13 @node Modus operandi, Showing off, Introduction, Introduction
14 @section Modus operandi
16 @cindex modus operandi
17 As already mentioned, Geiser relies on a running Scheme process to
18 obtain the information it makes accessible to the programmer.  There's
19 little effort, on the Elisp side, to understand, say, the module system
20 used by the Scheme implementation at hand; instead, a generic interface
21 between the two worlds is defined, and each supported Scheme includes a
22 library implementing that API, together with some wee shims in Elisp
23 allowing the reuse of the Emacs-side framework, which constitutes the
24 bulk of the code.
26 @cindex current module
27 @anchor{current-module} While being as generic as possible, the
28 Scheme-Elisp interface makes some assumptions about the capabilities and
29 interaction mode of the corresponding REPL.  In particular, Geiser
30 expects the latter to support namespaces in the form of a module system,
31 and to provide a well-defined way to establish the REPL's current
32 namespace (or module), as well as the current file's module (or
33 namespace).  Thus, all evaluations performed by Geiser either in the
34 REPL or in a source code buffer happen in the context of the current
35 namespace.  Every time you switch to a different file, you're switching
36 namespaces automatically; at the REPL, you must request the switch
37 explicitly (usually just using means provided by the Scheme
38 implementation itself).
40 If your favourite Scheme supports the above modus operandi, it has all
41 that's needed for a bare-bones Geiser mode.  But Geiser can, and will,
42 use any metadata available: procedure arities and argument lists to
43 display interactive help, documentation strings, location information to
44 jump to definitions, export lists to provide completion, and so on and
45 so forth.  Although this is not an all-or-none proposition (Geiser can
46 operate with just part of that functionality available), i've initially
47 concentrated in supporting those Schemes with the richest (to my
48 knowledge) introspection capabilities, namely, Guile and Racket.
50 @node Showing off,  , Modus operandi, Introduction
51 @section Showing off
52 @cindex swanking
53 When working with a fully conniving Scheme, Geiser can offer the
54 following functionality:
56 @itemize @bullet
57 @item
58 Form evaluation in the context of the current file's module.
59 @item
60 Macro expansion.
61 @item
62 File/module loading and/or compilation.
63 @item
64 Namespace-aware identifier completion (including local bindings, names
65 visible in the current module, and module names).
66 @item
67 Autodoc: the echo area shows information about the signature of the
68 procedure/macro around point automatically.
69 @item
70 Jump to definition of identifier at point.
71 @item
72 Access to documentation (including docstrings when the implementation
73 provides it).
74 @item
75 Listings of identifiers exported by a given module.
76 @item
77 Listings of callers/callees of procedures.
78 @item
79 Rudimentary support for debugging (when the REPL provides a
80 debugger) and error navigation.
81 @item
82 Support for multiple, simultaneous REPLs.
83 @item
84 Support for image display in those Schemes that treat them as first
85 class values.
86 @end itemize
88 In the following pages, i'll try to explain what these features
89 actually are (i'm just swanking here), and how to use them for your
90 profit.  But, before that, let's see how to install Geiser.
92 @c Local Variables:
93 @c mode: texinfo
94 @c TeX-master: "geiser"
95 @c End: