This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-20
Channels
- # announcements (3)
- # babashka (7)
- # beginners (43)
- # biff (19)
- # calva (39)
- # cider (16)
- # clerk (2)
- # clj-yaml (32)
- # cljs-dev (37)
- # clojure (129)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-europe (46)
- # clojure-filipino (1)
- # clojure-gamedev (25)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (2)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (5)
- # clojure-norway (8)
- # clojure-sg (1)
- # clojure-sweden (12)
- # clojure-taiwan (1)
- # clojure-uk (9)
- # clojurescript (14)
- # core-typed (136)
- # cursive (18)
- # duct (9)
- # emacs (12)
- # etaoin (7)
- # events (1)
- # graalvm (3)
- # gratitude (2)
- # humbleui (7)
- # hyperfiddle (99)
- # introduce-yourself (5)
- # jobs (2)
- # leiningen (1)
- # missionary (14)
- # nrepl (2)
- # off-topic (12)
- # polylith (21)
- # rdf (29)
- # re-frame (8)
- # releases (1)
- # shadow-cljs (264)
- # spacemacs (21)
- # sql (7)
- # vscode (1)
I reinstalled emacs/spacemacs recently. I am using the practicalli config.
I am unable to eval expressions in the buffer directly. , e v
does not return anything.
If I go to the repl and write an expression it evals it. How do I get eval in buffer again ?
Sounds like Emacs was not restarted after installing all the packages, or maybe is still compiling packages natively if that feature is enabled. Otherwise something is very broken and I dont know how to reproduce.
Are all the key bindings showing?
Does , e f
evaluate the top level form ?
I updated Emacs packages on the 12th September and I can use , e v
to evaluate a complete form successfully once the REPL has started.
Ensure that CIDER has loaded Clojure after starting the REPL by evaluating either an ns
form or a whole buffer that contains an ns
form.
I'm using cider package cider-20230912.1201
so I guess something could have broken since then.
Can you report what version of Cider is running, e.g. SPC SPC cider-version
in Emacs.
Very strange indeed. According to MELPA you have the latest Cider package. I will update my Emacs packages and see if I can reproduce
I've updated the CIDER package to the same version as you have and evaluation in the source code buffer is working. So it seems unlikely it a package or config issue.
I suggest tying a different Clojure project or creating a very simple project.
If the Emacs message buffer, SPC b m
, isn't showing errors, then I don't have specific advice, other than the general trouble shooting guide
Perhaps start by deleting the Cider package and restart Emacs to download the package again (it may have been a bad download).
https://practical.li/spacemacs/install-spacemacs/troubleshooting/
Can you also confirm that the Clojure source code buffer is in Clojure mode?
SPC SPC clojure-mode
will toggle Clojure mode on and off.
If the Clojure buffer is not in Clojure-mode, then it would explain why the eval commands are not working (but then none of the cider or clojure-mode keybindings would show either
hi @U05254DQM thanks for the help.
I deleted the elpa dir and reinstalled, same result.
When I try to do , s n
it gives me this error - save-current-buffer: Wrong type argument: stringp, nil
SPC SPC clojurescript-mode
connects it back, without any errrors, but it still doesnt work.
However I am able to do in-ns
and then eval forms in the repl. But I dont get any completions in the repl, I have to type the forms.
I don't have a key binding for , s n
I assume you using , s N
to sent namespace to repl and focus. This command works on my machine.
Can you send me the command used to start the REPL. If using jack-in, the command will be added to the *messages*
buffer, spc b m
Perhaps the middleware is not being included correctly
I have a default keybinding for , s n
- cider-send-ns-form-to-repl
on , s N
I get the following msg -
user-error: No cljs REPLs in current session "tallyfor/balance:localhost:8230"
I can replicate the issue in clojurescript-mode, but not in clojure-mode I suspect this is a bug in Cider as there have been some recent changes there...
Correction, I replicated the issue as I didnt start the clojurescript repl using jack-in, I stared a Clojure REPL instead. When I used cider-jack-in-cljs then I can evaluate in the buffer. I suspect that when evaluating in the clojurescript-mode buffer it is looking for a clojurescript-repl which Cider is not connected too (or not running)
I havent used shadow-cljs very much at all. I'd suggest going through the very specific shadow-cljs guide which precisely details how to setup and run the project. From comments I have seen, there is a specific way to make shadow-cljs work with Emacs, which should be covered by reading the detailed guide https://shadow-cljs.github.io/docs/UsersGuide.html People in the #C0617A8PQ channel may also have some advice about using Emacs with shadow-cljs, but I am afraid I have no experiences to share currently.