cider

Clojure on emacs fails when running cider-jack-in command

回眸只為那壹抹淺笑 提交于 2021-01-28 05:33:26
问题 I had been using Clojure on emacs on my Bunsenlabs linux which was similar to Debian. Ones it stopped working. cider-jack-in command caused error. Could anybody help me to fix it? The versions and error message are these: GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.20) of 2017-09-12, modified by Debian cider 20180207.239 clojure-mode 20180202.922 Leiningen 2.8.1 on Java 1.8.0_161 Java HotSpot(TM) 64-Bit Server VM Clojure 1.8.0 Loading 00debian-vars...done Loading /etc/emacs/site

“The clojure executable isn’t on your ‘exec-path’” even though lein is on my exec-path (macOS)

末鹿安然 提交于 2021-01-27 12:10:16
问题 I have the following exec-path (according to describe-variable ): ("/usr/local/bin/" "/usr/bin/" "/bin/" "/usr/sbin/" "/sbin/" "/usr/local/Cellar/emacs-plus/25.3/libexec/emacs/25.3/x86_64-apple-darwin16.7.0/") This is the lein executable path: /usr/local/bin/lein This is what happens when I run cider-jack-in : The clojure executable isn’t on your ‘exec-path’ What gives? Edit: ( cider-lein-command is lein ) 回答1: (from the comment) Looks like cider is looking for the clojure command, not the

“The clojure executable isn’t on your ‘exec-path’” even though lein is on my exec-path (macOS)

情到浓时终转凉″ 提交于 2021-01-27 12:04:25
问题 I have the following exec-path (according to describe-variable ): ("/usr/local/bin/" "/usr/bin/" "/bin/" "/usr/sbin/" "/sbin/" "/usr/local/Cellar/emacs-plus/25.3/libexec/emacs/25.3/x86_64-apple-darwin16.7.0/") This is the lein executable path: /usr/local/bin/lein This is what happens when I run cider-jack-in : The clojure executable isn’t on your ‘exec-path’ What gives? Edit: ( cider-lein-command is lein ) 回答1: (from the comment) Looks like cider is looking for the clojure command, not the

How to debug a console app from the REPL?

大兔子大兔子 提交于 2019-12-25 09:16:32
问题 It's really confortable to use emacs+cider for the daily development. All the stuff I've configured in my text editor makes it ideal for the task. The current project that I'm working on my spare time is a text editor . I've already implmented one in C++ and I used gdb to debug , from emacs. To run it, I entered set new-console on and run in the gdb buffer. This would pop a new console that would handle all the I/O . Now I'm trying to reimplement it in Clojure. By far, one of my biggest

Inspect state atom which gets updated by a ring handler

混江龙づ霸主 提交于 2019-12-24 16:00:41
问题 Consider the following scenario: A minimal boot task starts up a http server: (boot (serve :handler 'myapp.server/handler :port 3000)) (This might be launched in several ways, here it's ok to just run it from a nrepl session, e.g. started by boot repl from the terminal) The handler is represented by the function handler inside the namespace myapp.server . The corresponding file looks like this: (ns myapp.server (:require ...)) (defonce server-state (atom {:nr 0})) (defn handler [req] (prn

How to clear the REPL in cider-mode?

跟風遠走 提交于 2019-12-20 12:39:07
问题 I am not meaning cleaning up the text output of REPL; I mean cleaning up all evaluated results in REPL. During developing, repeatedly C-c C-q and C-c M-j is low efficiency. UPDATE There may be some bad debug behaviour of mine. I am not sure how other people develop progs with CIDER, but I really need the functionality mentioned above. I guess other developers also encounter same problems as mine. For example, at the top of a clojure prog unit, I use declare to declare a function foo , which

Output “System.out.println” into Emacs Cider's REPL (or other buffer)

半城伤御伤魂 提交于 2019-12-14 02:57:42
问题 I am using a Java library in Clojure . It does output many things directly to the console using System.out.println . I am using the latest Cider with Emacs. I am starting Cider with cider-jack-in . However, I can see these outputs. I thought they would be copied to the nrepl-server buffer, but it is not. I also tried to run (alter-var-root #'*out* (constantly *out*)) in the REPL, but no success. What am I missing in how this should be done, if it can be done at all. 回答1: You need to replace

How do I get emacs cider (clojure mode) to use my test environment variables when running tests?

為{幸葍}努か 提交于 2019-12-10 12:43:52
问题 I've set up separate database-url for development and test environments, and this works nicely when running my webapp in the REPL and from the lein test on the command line. Here's my profiles.clj : {:profiles/dev {:env {:database-url "wiki"}} :profiles/test {:env {:database-url "wiki-test"}}} And evidence of the right database instance being hit (I'm using CouchDB): ;; Running the site from the REPL: [info] [<0.12149.0>] 127.0.0.1 - - GET /wiki/home-page 200 [info] [<0.10353.0>] 127.0.0.1 -

clojure: profiles.clj not getting honored in some projects when using cider

╄→尐↘猪︶ㄣ 提交于 2019-12-07 11:59:25
问题 I'm facing the same issue that is mentioned in the last comment in https://stackoverflow.com/a/25401281/4329629 (by Yu Shen) I don't know why adding :plugins [[cider/cider-nrepl "0.7.0"]] at ~/.lein/profiles.clj does not work. But the same expression: :plugins [[cider/cider-nrepl "0.7.0"]] at the project.clj of my project worked as expected. Till now i thought that all my projects were behaving this way, but today i found something different. Maybe a hint to what is going wrong? The 2

Clojure - connection issue re-running cider-jack-in

瘦欲@ 提交于 2019-12-06 12:58:44
问题 I recently started using CIDER under Emacs 24. My workflow involves going to a remote server via Tramp and then executing cider-jack-in to run the nREPL server connected to Clojure on that server. It all works fine if I run it in a fresh instance of Emacs. But if for some reason the connection is broken or I hibernate the system, I am unable to relaunch the REPL. I get the following message: Connecting to nREPL on localhost:58062... error in process filter: open-network-stream: make client