This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws-lambda (6)
- # babashka (1)
- # beginners (204)
- # calva (10)
- # chlorine-clover (17)
- # cider (57)
- # cljs-dev (3)
- # cljsrn (3)
- # clojure (148)
- # clojure-bangladesh (1)
- # clojure-berlin (3)
- # clojure-europe (30)
- # clojure-france (1)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-spec (4)
- # clojure-uk (14)
- # clojurescript (15)
- # code-reviews (8)
- # conjure (27)
- # crux (8)
- # data-science (9)
- # datomic (38)
- # duct (6)
- # figwheel-main (11)
- # fulcro (78)
- # helix (11)
- # jobs (1)
- # malli (18)
- # meander (22)
- # mount (4)
- # nrepl (3)
- # off-topic (93)
- # pathom (2)
- # pedestal (4)
- # re-frame (5)
- # reagent (6)
- # reitit (1)
- # ring-swagger (1)
- # sci (1)
- # shadow-cljs (19)
- # spacemacs (1)
- # sql (1)
- # tools-deps (76)
- # unrepl (1)
- # vim (5)
I'm having trouble with
M-x cider-jack-in when I try to start a new REPL I get this feedback:
The lein executable isn't on your 'exec-path
The only problem is that i download lein to /usr/bin and when I describe exec-path Its value is:
("/home/sfernandez/.local/bin/" "/app/bin/" "/usr/bin/" "/app/libexec/emacs/26.3/x86_64-pc-linux-gnu/")
So, I'm not sure if that's the problem...
In scratch I did
(print cider-lein-command) and it's value is:
That is "lein" printed twice? Even if I execute
$ lein repl in terminal and then try to connect to it that works fine, but I get this warning:
WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it!
Should I just always use
cider-connect ? I've been stuck on trying to get jack in to work for a while
I always use cider jack in. If you cider-connect you need to ensure that ciders middleware are set up
Can you execute “which lein” from a terminal and then do the same from an eshell buffer
@dpsutton which lein from terminal gives: /usr/bin/lein which lein from eshell buffer gives: which: no lein in (/home/sfernandez/.local/bin:/app/bin:/usr/bin) that seems problematic?
Pop!OS 20.04 LTS x8664
“/usr/bin/lein repl” from eshell -> just gives a command not found?
i could have installed it incorrectly i'm kind of a noob, I did :
and then a :
sudo mv lein /usr/bin from root
then i changed directory to
chmod a+x lein
and I ran the script it seems to have worked fine? it did install and download the self-install package, i just followed instructions from: https://leiningen.org/ in Install section
I don't know what closing it means. If you ensure that the emacs process is killed and restarted. gets complicated since some people use emacsclient
pretty sure i've restarted it and ls -l /usr/bin/lein is "-rwxrwxr-x 1 sfernandez sfernandez 13413 Jul 5 20:50 /usr/bin/lein"
but nothing out of the ordinary there. i was suspecting maybe it got moved and set root as its user
whole bunch of stuff with ls /usr/bin i tried ls /usr/bin | grep "lein" and got nothing as expected
maybe try putting it somewhere else on your path? I don't understand how it wouldn't be visible
did it illuminate why the original placement wasn't working or its working as you expect from the new location?
yeah now im just googling this part but the error was
error in process sentinel: Could not start nREPL server: /home/sfernandez/.local/bin/lein: line 255: type: java: not found Leiningen couldn't find 'java' executable, which is required. Please either set JAVA_CMD or put java (>=1.6) in your $PATH (/home/sfernandez/.local/bin:/app/bin:/usr/bin).
@dpsutton i really just ran a java --version saw some output and was on my way earlier very sad
@dpsutton Did you know that if you launch the GUI version of emacs from favorites it doesn't get any information from your $PATH, but if you launch it from terminal everything works lmao, sigh...
@sfernandez0201 if you update your path in your dotfiles then any GUI application will require a logout of the desktop (or restart the operating system) if run from favorites or some other type of application launcher. If you update the path in dotfiles then you need to restart a terminal or use
source .dotfile-name to read in the new path setting. This is standard on Unix systems (Linux, MacOSX).
I also configur .profile to read the .bashrc file, so that apps run from favourites or an app launcher also used the settings in that file.
# if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi
I updated $PATH in .zshrc and did run source afterwards. I restarted and still had the same problem, when I launch emacs from favorites, I still have a different $PATH than if I launch it from terminal. I didn't try adding your suggestion to .zshrc though. I will try that. Thanks!
Is it possible to specify the port for leiningen plugin
cider/cider-nrepl . I'm trying to use docker for development, so I want a fixed port number to expose in Dockerfile.
If I understood you right, and you are using Leiningen to start your project REPL, then this is what we add to our
project.clj file when using Docker: https://github.com/magnetcoop/pubsub/blob/master/project.clj#L25-L26
how are you starting your project? You should be able to specify the port you want for nrepl
Is it possible to send a function or a region to repl and paste the result right after it?
Basically, just trying to avoid manual copying from cider REPL and pasting it back.
(+ 1 2) ;; trigger-some-magic-cider-func which pastes back into editor: 3
You're welcome. :) > It is bound to C-c M-;, <M-return> e ;, M-m m e ;, and many ordinary text
, e ; in Spacemacs Evil normal mode.
There are also pretty print versions of comment functions
These functions pretty print (e.g. print data structures in a more human readable form) as comments in the source code cider-pprint-eval-defun-to-comment cider-pprint-eval-last-sexp-to-comment They are comment versions of the pretty print functions: cider-pprint-eval-defun-at-point cider-pprint-eval-last-sexp I use the eval-last-sexp commands for expressions nested inside others and defun-at-point for the overal expression.
pprint to comment is useful for maps with lots of keys or nested data structures. Be careful not to use it for huge return values as it doesnt limit itself to 100 results like the other evaluations do (i should figure out if there is an option for this). The
cider-inspector is an excellent way of reviewing uncomfortably sized data https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html