Use the template below when reporting bugs. Please, make sure that
you're running the latest stable CIDER and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Remove all of the placeholder text in your final report!
I start a repl, works fine. then i kill it with: kill-this-buffer. then i try to start a new repl and it doesn't work.
see above, but instead of opening a repl it sends the message: selecting deleted buffer to the mini-buffer
cider-jack-in-cljskill-this-buffercider-jack-in-cljs. Repl doesn't start and error message: selecting deleted buffer echoes in mini-buffer.This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
;; CIDER 0.18.1snapshot (package: 20180903.2111), nREPL 0.2.13
;; Clojure 1.9.0, Java 1.8.0_172
╰─➤ lein --version
Leiningen 2.8.1 on Java 1.8.0_172 OpenJDK 64-Bit Server VM
GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05
╰─➤ uname -a
Linux archlinux 4.17.12-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 3 07:16:41 UTC 2018 x86_64 GNU/Linux
works okay if i use cider-quit so maybe not too big an issue.
@vspinu Guess you should take a look into this. Another person just reported something similar on Slack.
I'm having the same issue.
Cider: CIDER 0.18.1snapshot (package: 20180903.2111)
Lein: Leiningen 2.7.1 on Java 1.8.0_151 Java HotSpot(TM) 64-Bit Server VM
Emacs: GNU Emacs 25.3.1 (x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29)) of 2017-09-15
OS: macOS 10.13.6
also met this issue, except cider-quit doesn't help. In my case the difference is that i don't jack-in but connect.
I also have the same problem actually, not not with all projects
I had the same issue. I don't know Emacs Lisp very well, but this change in the file elpa/cider-0.18.0/cider-connection.el fixed the problem:
(defun cider--gather-session-params (session)
"Gather all params for a SESSION."
(let (params)
(dolist (repl (cdr session))
(when (buffer-name repl)
(setq params (cider--gather-connect-params params repl))))
(when-let* ((server (cider--session-server session)))
(setq params (cider--gather-connect-params params server)))
params))
I've added the (when (buffer-name repl) ...) Basically the problem was that cider--gather-connect-params was called on a killed buffer, after you have closed a cider / nrepl connection. buffer-name returns nil, if it is a killed buffer.
Ah yes that seems to work @maxweber until there is an official fix, thanks a lot!
But I wonder why it happens on one project and not another project, and it doesn't really look like it's related with the settings I have in .dir-locals.el though
I will have a look. For now you can do restart. Either cider-restart (C-c M-r) for one repl or the full session with C-c C-s C-r (sesman-restart-session).
@bbatsov I reported that on slack but couldn't find the time to fill the ticket here.
;; CIDER 0.18.1snapshot (package: 20180903.2111), nREPL 0.2.13
;; Clojure 1.8.0, Java 10.0.2
And @maxweber solution worked just fine for me too.
I have that problem with latest cider and using clojure-cli + figwheel
I'm seeing the same behavior here (Spacemacs on Emacs 27.0.50, Cider 0.18.1 Snapshot, Clojure 1.9 and 1.8)
I have encountered this issue as well, the work around is to run both clj-quit and sesman-quit to get jack-in working again.
Same issue here.
(defun my/close-buffer ()
(interactive)
(if (and (fboundp 'cider-repls) ;; is cider loaded?
(member (current-buffer) (cider-repls)))
(cider-quit)
(if server-buffer-clients
(server-edit)
(kill-this-buffer))))
;; ... and for convenience
(global-set-key (kbd "s-k") 'my/close-buffer) ;; 'winkey-k'
Most helpful comment
I had the same issue. I don't know Emacs Lisp very well, but this change in the file
elpa/cider-0.18.0/cider-connection.elfixed the problem:I've added the
(when (buffer-name repl) ...)Basically the problem was thatcider--gather-connect-paramswas called on a killed buffer, after you have closed a cider / nrepl connection.buffer-namereturns nil, if it is a killed buffer.