Fork me on GitHub

@luxbock Doesn't it just prompt you for the host and the port? What exactly is your issue?


@dpsutton re the cljs repl - as we're using nREPL for it we can use the self-hosted cljs anyways, that's the reason why we end up with two repls


we can probably hide one of them, but nobody's going to gain anything from this


that's less than ideal, but without either an nREPL server that works on cljs or adding support for the built-in socket repl that's the best we can do for now


@bozhidar yes, I've tried entering "localhost" and "" for host, and calling (cider-connect "localhost" "7888") directly but I get "[nREPL] Direct connection failed", yet lein :connect 7888 works and I confirmed that I'm connecting to the process started by invoking the jar file


ah, think I just figured out what was wrong, I was trying to call the command from a buffer associated with a file which was not in the same directory as for where I invoked the jar file from


@luxbock I guess Bozhidar was saying that it should prompt when you call it with M-x (no params)


@richiardiandrea yeah, I tried as many combinations for host and port I could think of but I didn't realize the directory needed to match as well


sorry for the confusion


What happens when you just call cider-connect?


It is C-c M-c iirc


@richiardiandrea I get prompted for host and port, for which I tried a number of combinations but it always failed to connect, but as I said the issue was stemming from calling the command from a buffer which was associated with a different directory from where I had invoked the JAR from


Hm it is weird because I do what you say all the time, say I have a repl on a project going and I want to debug lein-figwheel: I open the project with projectile in another frame and cider-connect to the running thing


@richiardiandrea I assume you start the REPL via lein figwheel in the project root?


But OK, it is good that it works now :)


No, via cider and boot


I had moved my JAR file into a ./release directory and invoked it from there


I'm a bit confused by your explanations, but I'm happy you got it working 🙂


is there a way for avoiding the prompt when the project contains both build.boot and project.clj?


is there a preferred way to run figwheel from cider? i've seen the instructions on the figwheel wiki, just wondering if there's a nicer way. i was considering setting cider-cljs-lein-repl via .dir-locals.el but would greatly appreciate any hard-won advice TIA



(defcustom cider-preferred-build-tool
  "Allow choosing a build system when there are many.
When there are artifacts from multiple build systems (\"lein\", \"boot\",
\"gradle\") the user is prompted to select one of them.  When non-nil, this
variable will suppress this behavior and will select whatever build system
is indicated by the variable if present.  Note, this is only when CIDER
cannot decide which of many build systems to use and will never override a
command when there is no ambiguity."
  :type '(choice (const "lein")
                 (const "boot")
                 (const "gradle")
                 (const :tag "Always ask" nil))
  :group 'cider
  :package-version '(cider . "0.13.0"))


i have an external service printing lots of logging through the buffer cider-repl my-project, so i set nrepl-log-messages to t, thinking that all logging would be redirected to nrepl-messages my-project. but all logging is now being printed to both cider-repl my-project and nrepl-messages my-project. can i suppress logging in cider-repl my-project?


this is an issue that has been debated recently due to a bug fix


emacs (spacemacs) crawls when printing all that logging; that’s why i’m interested in this


CIDER had in the past erroneously not passed writing to standard out back to the cider repl. This was fixed and is the behavior you are seeing


at some place in your code you are writing to System/out, which only makes sense that it gets redirected to your repl


interesting. thanks.


the idea is that you turned on console logging and attached a console


for me to fix this, i should change the code in the external service to print to something other than System/out?


well your current logging strategy is to print to interested parties. This seems like a shortlived and bad logging strategy. would you prefer to write to a log file?


also, your logging solution should have some idea of granularity, right?


like info, debug, warning, error, fatal, etc


can you raise the threshold?


maybe you still want to see warnings but not info or debug so just raise the threshold?


i would much prefer to log to a file infos and debugs, and see warnings and errors. i’m pretty new as regards clojure. should i configure how i log things in clojure? all i know so far is the external service (java fwiw, EmbeddedSolrSolver) is printing everything


@mfm that sounds like a good strategy but I don't have much experience in java


i’m worried that, i call basically (.doThing EmbeddedSolrServer), then EmbeddedSolrServer just System.out.printlns whatever it wants. i’m hoping that clojure logging can ingest those messages and filter them.


haven’t looked into how EmbeddedSolrServer does anything, though. nor do i know anything about clojure logging.


thanks very much dpsutton


but how would you distinguish which writing to system out are important or not?


Permanent Logging Settings
Solr uses Log4J version 1.2 for logging and is configured using server/resources/ Take a moment to inspect the contents of the file so that you are familiar with its structure. By default, Solr log messages will be written to SOLR_LOGS_DIR/solr.log.
When you're ready to deploy Solr in production, set the variable SOLR_LOGS_DIR to the location where you want Solr to write log files, such as /var/solr/logs. You may also want to tweak Note that if you installed Solr as a service using the instructions provided at Taking Solr to Production, then see /var/solr/ instead of the default server/resources version.
When starting Solr in the foreground (-f option), all logs will be sent to the console, in addition to solr.log. When starting Solr in the background, it will write all stdout and stderr output to a log file in solr-<port>-console.log, and automatically disable the CONSOLE logger configured in, having the same effect as if you removed the CONSOLE appender from the rootLogger manually.
Also, in the default log rotation size threshold of 4MB is most likely too small for production servers and should be increased to a larger value (such as 100MB or more).


Hi, is there a quick way to switch off cider's changing of font faces? I'm in a terminal and the faces are fine in clojure mode, but cider messes everything up with reverse and stuff.




might be the ticket


set that to nil


> with reverse and stuff do you mean reverse from clojure.core?


its font-locking all the clojure stuff?


it is (apparently) font-locking the functions it knows.


but setting c-f-l-d to nil helps, thanks a lot!


yeah it asks the backend the core, macros, deprecated, etc and then font-locks them


if you look at that var, you can set it to a few different values


it is nicely documented, yes. but i don't want to spend time on figuring out face configuration in this chain of terminal emulator and emacs, so nill will do 🙂


haha sounds good. happy coding