This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-15
Channels
- # architecture (5)
- # babashka (34)
- # beginners (72)
- # calva (42)
- # cherry (31)
- # cider (14)
- # clojure (27)
- # clojure-europe (11)
- # clojure-norway (17)
- # clojure-uk (1)
- # clojurescript (25)
- # community-development (13)
- # conjure (1)
- # core-async (11)
- # datascript (18)
- # datomic (11)
- # emacs (12)
- # fulcro (10)
- # integrant (5)
- # introduce-yourself (3)
- # jobs (8)
- # juxt (2)
- # malli (22)
- # off-topic (11)
- # pathom (18)
- # polylith (62)
- # rdf (18)
- # reagent (8)
- # releases (1)
- # shadow-cljs (35)
- # sql (3)
- # squint (141)
- # tools-deps (12)
- # vim (4)
- # xtdb (4)
How would i eval clojure code in the context of a specific nrepl (the one started from the project), from a cider/elisp function? I was thinking `hmm, any chance you know how to have cider eval some clojure code in the repl it just started? the only thing i see is
(cider-read-and-eval "(println 'hi')")
To add some context, i want to either start my http server with a emacs short cut or just have it turned on by default when i start a repl from the project.I would use nrepl-sync-request:eval
or nrepl-request:eval
> To add some context, i want to either start my http server with a emacs short cut or just have it turned on by default when i start a repl from the project.
I think the idiomatic thing would be to have a shortcut to Component-/Integrant- (reset)
your system. That way you use the same shortcut at repl startup and later on
I'm trying to get the following to work: I'm on Emacs Windows, the code is on a Linux box, and I open it using Tramp. I'm trying to cider-jack-in-clj
but first the call fails with error in process sentinel: Could not start nREPL server: /bin/sh: 2: powershell: not found
. The command used is clojure-cli
. According to docs (https://docs.cider.mx/cider/basics/up_and_running.html#working-with-remote-hosts), CIDER should handle remote files transparently, but in this case this is not true. This I can override by manually setting cider-clojure-cli-command
to clojure
.
But the process still fails: the ssh tunnel to access the remote nrepl is not created correctly. CIDER calls this to set up the tunnel: start /b cmd /c "\Program Files\Emacs\x86_64\libexec\emacs\27.2\x86_64-w64-mingw32\cmdproxy.exe" -c "c:/Windows/System32/OpenSSH/ssh.exe -v -N -L 35627:localhost:35627 'my.server.name'"
. This gives the error "'\Program' is not recognized as an internal or external command, operable program or batch file." If I remove the whole start /b cmd /c
from the beginning, and just call cmdproxy on command line, there is no problem; except that the host name should not be surrounded by single quotes.
By setting up the tunnel manually, everything seems to work out fine, so there's something wrong with how the tunnel is set up.
I don't know much about Windows (I'd rather work with Linux, but you work with the tools your given.) so I don't know what is the correct way the construct this tunnel, but this does seem a bit complicated.
Is there something in the CIDER configuration that I could set to fix this?
The single quotes are added in the function nrepl--ssh-tunnel-command
. I wonder if these are really necessary? When removing from this, a tunnel can be started with start-process-shell-command
as is done in nrepl--ssh-tunnel-connect
.
I am getting this error on all my projects, but I am running it in this case my deps.edn looks like
{:deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:paths ["src" "resources"]
}
are you on linux? see https://docs.cider.mx/cider/about/compatibility.html#java
I am on linux. I am running PopOS, but using guix as my package manager
thanks
That was exactly it! Thanks I just needed to add the :jdk
to my manifest