summaryrefslogtreecommitdiff
path: root/doc/intro.texi
blob: 00207cd7eed10d98939adea979a1bf25cf5c6d94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
@node Introduction, Installation, Top, Top
@chapter Introduction

Geiser is an Emacs environment to hack and have fun in Scheme.  If that's
enough for you, see @ref{Installation} to get it running and
@ref{The REPL} for the fun part.

@menu
* Modus operandi::
* Showing off::
@end menu

@node Modus operandi, Showing off, Introduction, Introduction
@section Modus operandi

@cindex modus operandi
As already mentioned, Geiser relies on a running Scheme process to
obtain the information it makes accessible to the programmer.  There's
little effort, on the Elisp side, to understand, say, the module system
used by the Scheme implementation at hand; instead, a generic interface
between the two worlds is defined, and each supported Scheme includes a
library implementing that API, together with some wee shims in Elisp
allowing the reuse of the Emacs-side framework, which constitutes the
bulk of the code.

@cindex current module
@anchor{current-module} While being as generic as possible, the
Scheme-Elisp interface makes some assumptions about the capabilities and
interaction mode of the corresponding REPL.  In particular, Geiser
expects the latter to support namespaces in the form of a module system,
and to provide a well-defined way to establish the REPL's current
namespace (or module), as well as the current file's module (or
namespace).  Thus, all evaluations performed by Geiser either in the
REPL or in a source code buffer happen in the context of the current
namespace.  Every time you switch to a different file, you're switching
namespaces automatically; at the REPL, you must request the switch
explicitly (usually just using means provided by the Scheme
implementation itself).

If your favourite Scheme supports the above modus operandi, it has all
that's needed for a bare-bones Geiser mode.  But Geiser can, and will,
use any metadata available: procedure arities and argument lists to
display interactive help, documentation strings, location information to
jump to definitions, export lists to provide completion, and so on and
so forth.  Although this is not an all-or-none proposition (Geiser can
operate with just part of that functionality available), i've initially
concentrated in supporting those Schemes with the richest (to my
knowledge) introspection capabilities, namely, Guile and Racket.

@node Showing off,  , Modus operandi, Introduction
@section Showing off
@cindex swanking
When working with a fully conniving Scheme, Geiser can offer the
following functionality:

@itemize @bullet
@item
Form evaluation in the context of the current file's module.
@item
Macro expansion.
@item
File/module loading and/or compilation.
@item
Namespace-aware identifier completion (including local bindings, names
visible in the current module, and module names).
@item
Autodoc: the echo area shows information about the signature of the
procedure/macro around point automatically.
@item
Jump to definition of identifier at point.
@item
Access to documentation (including docstrings when the implementation
provides it).
@item
Listings of identifiers exported by a given module.
@item
Listings of callers/callees of procedures.
@item
Rudimentary support for debugging (when the REPL provides a
debugger) and error navigation.
@item
Support for multiple, simultaneous REPLs.
@item
Support for image display in those Schemes that treat them as first
class values.
@end itemize

In the following pages, i'll try to explain what these features
actually are (i'm just swanking here), and how to use them for your
profit.  But, before that, let's see how to install Geiser.

@c Local Variables:
@c mode: texinfo
@c TeX-master: "geiser"
@c End: