Fork me on GitHub

Hey! New to clojure, and just installed CIDER, but I'm facing an issue. Every time I try to evaluate a function in my file, after M-x cider-jack-in, it returns fine if the function returns a value, but if it returns nil, i get the following error: error in process filter: eval: Wrong type argument: characterp, nil, and the REPL takes a few seconds to print the result, then hangs. I'm running Emacs 26.1 on Win10 using the newest version of CIDER from melpa. I saw someone else with the same problem on reddit ( but couldn't find any followup in GitHub, so I wanted to post here before posting a new GitHub issue, in case it's an already solved problem.


that post mentions that sayed might be an issue. Are you running any plugins? Is this in spacemacs which brings a few more of the ancillary CIDER projects?


i'm up to date with master and can't reproduce. but happy to walk through it with you


No this is my own Emacs config, not many other plugins installed (except clj-refactor and smartparens)


and any trivial project, anything returning nil triggers this? nothing special?


(and clj-refactor is up to date)?


I have attempted deleting my elpa folder multiple times, so should have the newest version of all plugins


ok. and in your project file (project.clj or deps.edn) are you specifying versions of cider nrepl and refactor-nrepl or letting CIDER inject those for you?


CIDER injects them, the only dependency is clojure 1.9.0


the error also happens when actually typing out a command in the CIDER repl, for instance (println "Hello")


ok. can we try this without cider refactor then?


see if we can isolate the layer causing the problem. I suspect it is there since i can't reproduce


let's see. I do that by just removing clj-refactor as an emacs package, I guess?


yes. that should be it. i vaguely remember it having some kind of sticky setting somewhere but its been a while since i've used it


alright, I removed clj-refactor (had to delete the package folder manually to make the nREPL not add nREPL-refactor as a plugin. the first eval works fine, but the same issue happens on subsequent evaluations.


how versed in emacs are you? could you set the debugger to begin on errors and find your way through stack traces?


i wish i could replicate


I'll try enabling the debugger!


toggle-debugger-on-error should be what we want


That pointed me to pretty-mode! disabling it seemed to work. I think pretty mode wanted to redraw nil to some other symbol, which caused the system to hang


Ah! No idea what that is but it sounds bad.


By the way, thanks for a very patient and thorough guide through the issue! Makes me feel very welcome into the community.


Glad to have you


pretty-mode redraws certain symbols to their mathematical equivalents. lambda to λ etc


it's just vanity to have it enabled, so I have no problems turning it off for working with clojure 🙂


ah i see. i normally don't like those because copy and paste and alignment get weird


but for sure they look good in screen shots and on twitter


same thing with ligatures


Hi there. Could someone help me with getting cider to work with clojurescript and figwheel? I cannot seem to get it working properly.


My problem in cider is that I can get cider to start an nrepl, but if I use figwheel as repl type it open the website, but then I have a prompt saying "STDIN:" in the minibuffer at the bottom. Inside that minibuffer I can interact with the clojurescript repl but I can't send any sexp from my core.cljs buffer in emacs to the figwheel repl.


And if I use the newer figwheel-main repl type (and a project created with lein new figwheel-main) cider still opens up the website and tries to create a figwheel repl, but the last thing printed in the cider-repl is "Opening URL http://localhost:9500" and after that nothing happens.


Also cider is always showing "not connected" in my modeline in emacs.