summaryrefslogtreecommitdiff
path: root/README
blob: 141b83db2be4b7382311baf9622cd453f98690c2 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
* Overview

  Geiser is a generic Emacs/Scheme interaction mode, featuring an
  enhanced REPL and a set of minor modes improving Emacs' basic scheme
  major mode. The main functionalities provided are:

    - Evaluation of forms in the namespace of the current module.
    - Macro expansion.
    - File/module loading.
    - Namespace-aware identifier completion (including local bindings,
      names visible in the current module, and module names).
    - Autodoc: the echo area shows information about the signature of
      the procedure/macro around point automatically.
    - Jump to definition of identifier at point.
    - Access to documentation (including docstrings when the
      implementation provides it).
    - Listings of identifiers exported by a given module.
    - Listings of callers/callees of procedures.
    - Rudimentary support for debugging (list of
      evaluation/compilation error in an Emacs' compilation-mode
      buffer).

   Currently supported implementations are Guile and PLT.

    - Guile 1.9.x virtual machine required.
    - PLT Scheme 4.1.5.5 or better required.

* Installation

  - In your .emacs:

     (load-file "<path-to-geiser>/elisp/geiser.el")

    This installs all supported Scheme implementations. You can list
    explicitly the ones that you want by setting the variable
    `geiser-impl-installed-implementations' *before* loading geiser.el.
    For instance:

     (setq geiser-impl-installed-implementations '(plt guile))

    On opening a scheme file, Geiser will try to guess its Scheme,
    defaulting to the first in the list.

  - Check the geiser customization group for some options with:

      M-x customize-group RET geiser RET

    In particular, customize `geiser-repl-<impl>-binary' (in
    geiser-repl), which should point to an executable in your path.

  - To start a REPL, M-x geiser.

* Quick key reference

*** In Scheme buffers:

    |---------------------+-------------------------------------------------|
    | C-c C-z             | Switch to REPL                                  |
    | C-c C-s             | Specify Scheme implementation for buffer        |
    |---------------------+-------------------------------------------------|
    | M-.                 | Go to definition of identifier at point         |
    | M-,                 | Go back to where M-. was last invoked           |
    | C-c C-e m           | Ask for a module and open its file              |
    |---------------------+-------------------------------------------------|
    | C-M-x               | Eval definition around point                    |
    | C-c M-e             | Eval definition around point and switch to REPL |
    | C-x C-e             | Eval sexp before point                          |
    | C-c C-r             | Eval region                                     |
    | C-c M-r             | Eval region and switch to REPL                  |
    |---------------------+-------------------------------------------------|
    | C-c C-m x           | Macro-expand definition around point            |
    | C-c C-m e           | Macro-expand sexp before point                  |
    | C-c C-m r           | Marcro-expand region                            |
    | C-u C-c C-m [x,e,r] | (With prefix, macro expansions are recursive)   |
    |---------------------+-------------------------------------------------|
    | C-c C-k             | Compile and load current file                   |
    | C-c C-l             | Load current file                               |
    |---------------------+-------------------------------------------------|
    | C-c C-d d           | See documentation for identifier at point       |
    | C-c C-d m           | See a list of a module's exported identifiers   |
    | C-c C-d a           | Toggle autodoc mode                             |
    |---------------------+-------------------------------------------------|
    | C-c<                | Show callers of procedure at point              |
    | C-c>                | Show callees of procedure at point              |
    | C-c C-x f           | See a generic's methods signatures              |
    |---------------------+-------------------------------------------------|
    | M-TAB               | Complete identifier at point                    |
    | M-`, C-.            | Complete module name at point                   |
    | TAB                 | Complete identifier at point or indent          |
    |                     | (If `geiser-mode-smart-tab-p' is t)             |
    |---------------------+-------------------------------------------------|

*** In the REPL

    |----------------+----------------------------------------------------|
    | C-c C-z, C-c z | Start Scheme REPL (if it's not running)            |
    |----------------+----------------------------------------------------|
    | M-.            | Edit identifier at point                           |
    | TAB, M-TAB     | Complete identifier at point                       |
    | M-`, C-.       | Complete module name at point                      |
    |----------------+----------------------------------------------------|
    | M-p, M-n       | Prompt history, matching current prefix            |
    |----------------+----------------------------------------------------|
    | C-c C-k, C-c k | Nuke REPL: use it if the REPL becomes unresponsive |
    |----------------+----------------------------------------------------|
    | C-c l          | Load scheme file                                   |
    |----------------+----------------------------------------------------|
    | C-c d          | See documentation for identifier at point          |
    | C-c m          | See module documentation                           |
    | C-c a          | Toggle autodoc mode                                |
    |----------------+----------------------------------------------------|

*** In the documentation browser:

    |-----------+----------------------------------------------|
    | n/p       | next/previous page                           |
    | l         | previous page                                |
    | SPC/S-SPC | scroll up/down                               |
    | TAB/S-TAB | next/previous link                           |
    | k         | kill current page and go to previous or next |
    | r         | refresh page                                 |
    | c         | clean browsing history                       |
    | M-.       | edit identifier at point                     |
    | C-cz      | switch to REPL                               |
    | q         | bury buffer                                  |
    |-----------+----------------------------------------------|

*** In backtrace (evaluation/compile result) buffers:

    - Default error navigation keys used by Emacs' compilation mode
      (e.g. M-g n, M-g p for next/previous error).
    - q to bury buffer.