@@ -119,6 +119,44 @@ For leiningen, there are no command line switches and you need to add a custom [
119
119
...
120
120
```
121
121
122
+ #### Multiple Process Support
123
+
124
+ To run multiple Clojure processes, you start the first up
125
+ with ` inf-clojure ` . It will be in a buffer named ` *inf-clojure* ` .
126
+ Rename this buffer with ` rename-buffer ` . You may now start up a new
127
+ process with another ` inf-clojure ` . It will be in a new buffer,
128
+ named ` *inf-clojure* ` . You can switch between the different process
129
+ buffers with ` switch-to-buffer ` .
130
+
131
+ Commands that send text from source buffers to Clojure processes (like ` inf-clojure-eval-defun `
132
+ or ` inf-clojure-show-arglists ` ) have to choose a process to send to, when you have more than
133
+ one Clojure process around. This is determined by the global variable ` inf-clojure-buffer ` .
134
+
135
+ Suppose you have three inferior Clojures running:
136
+
137
+ ```
138
+ Buffer Process
139
+ ------ -------
140
+ foo inf-clojure
141
+ bar inf-clojure<2>
142
+ *inf-clojure* inf-clojure<3>
143
+ ```
144
+
145
+ If you do a ` inf-clojure-eval-defun ` command on some Clojure source code,
146
+ what process do you send it to?
147
+
148
+ - If you're in a process buffer (foo, bar, or * inf-clojure* ),
149
+ you send it to that process.
150
+ - If you're in some other buffer (e.g., a source file), you
151
+ send it to the process attached to buffer ` inf-clojure-buffer ` .
152
+
153
+ This process selection is performed by function ` inf-clojure-proc ` .
154
+ Whenever ` inf-clojure ` fires up a new process, it resets
155
+ ` inf-clojure-buffer ` to be the new process's buffer. If you only run
156
+ one process, this does the right thing. If you run multiple
157
+ processes, you might need to change ` inf-clojure-buffer ` to
158
+ whichever process buffer you want to use.
159
+
122
160
## Configuration options
123
161
124
162
In the time-honoured Emacs tradition ` inf-clojure ` 's behaviour is extremely
@@ -127,7 +165,7 @@ configurable.
127
165
You can see all the configuration options available using the command
128
166
` M-x customize-group RET inf-clojure ` .
129
167
130
- ## REPL Type
168
+ #### REPL Type
131
169
132
170
An ` inf-clojure ` REPL can be of different types: Clojure,
133
171
ClojureScript, Lumo and Planck are all potentially valid options. At
@@ -150,7 +188,7 @@ Lumo just add the following in your `.dir-locals.el`:
150
188
((nil . ((inf-clojure-boot-cmd . "lumo -d")))) ;; inf-clojure-lein-cmd if you are using Leiningen
151
189
```
152
190
153
- ## ElDoc
191
+ #### ElDoc
154
192
155
193
` eldoc-mode ` is supported in Clojure source buffers and ` *inferior-clojure* `
156
194
buffers which are running a Clojure REPL.
@@ -170,7 +208,7 @@ following to you Emacs config:
170
208
ElDoc currently doesn't work with ClojureScript buffers and REPL's.
171
209
You can leave it enabled, it just won't show anything in the echo area.
172
210
173
- ## Lumo Setup
211
+ #### Lumo Setup
174
212
175
213
For an optimal Lumo experience the ` -d ` needs to be passed to Lumo
176
214
when launched from the command line. This disable ` readline ` support
0 commit comments