Me and my colleague see a problem where paredit-mode makes the cider-repl buffer in emacs doesn’t really work anymore. It is still possible to send sexprs to cider from buffers with code in them.
When paredit is disabled things seem to work as they should.
I tried to create a new .emacs and tried with smart-parens, which is probably even better than paredit, but I don’t understand how to bind sp-kill-hybrid-sexp
to C-k
. This is the paredit-functionality I use the most so I cannot really live without it.
How do I bind sp-kill-hybrid-sexp
to C-k
when smartparens mode is enabled?
Sounds like you may have hit this issue:
opened 07:12PM - 10 Dec 22 UTC
closed 05:52PM - 11 Dec 22 UTC
## Expected behavior
After running `cider-jack-in`, and typing `(+ 2 2)` at t… he prompt, then hitting enter, the expression is evaluated and the buffer displays the return value of `4` before giving a new prompt.
## Actual behavior
Repl buffer hangs indefinitely after hitting enter to evaluate any expression.
## Steps to reproduce the problem
1. Install Emacs 28.2 via homebrew.
2. Install `cider` via MELPA.
3. Install `paredit` via MELPA.
4. Install `lein` and use `lein new` to create a new project.
5. Run `emacs <name of core.clj file in new project>` to open the clj file
6. Run `cider-jack-in`
7. In the repl buffer, run `paredit-mode` to turn on paredit mode.
8. At the repl prompt, enter `(+ 2 2)` and hit enter.
_Note: On my system, if I do not turn on paredit-mode in the repl buffer, everything works normally._
## Environment & Version information
### CIDER version information
```
;; Connected to nREPL server - nrepl://localhost:53570
;; CIDER 1.5.0 (Strasbourg), nREPL 0.9.0
;; Clojure 1.11.1, Java 19.0.1
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
```
### Lein / Clojure CLI version
`Leiningen 2.9.10 on Java 19.0.1 OpenJDK 64-Bit Server VM`
### Emacs version
28.2
### Operating system
MacOS 12.6.1
### JDK distribution
```
java version "19.0.1" 2022-10-18
Java(TM) SE Runtime Environment (build 19.0.1+10-21)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)
```
A recent update to paredit remapped the Return key (!!) causing the CIDER repl to seem not to work.
The solution is to add this to your init file (init.el or .emacs):
(define-key paredit-mode-map (kbd "RET") nil)
1 Like
Thanks a lot , this did the trick!
1 Like