I’m using Emacs Live because it seemed nice and saves me a lot of configuration work. Now it worked fine for a few days, but today something apparently broke. Specifically, auto completion broke (I believe it might be an issue with ac-nrepl). Basically, my minibuffer now only shows “Namespace not found.”, I don’t get real auto-completion anymore (only completion on words that are already in the file). And when I run C-c M-n I get an empty *nREPL error* buffer every time auto completion would usually kick in.
EDIT: This only happens when I start an nrepl-server with nrepl-jack-in. Just connecting to an existing one (e.g. created with lein repl) works fine.
The issue with
Namespace not foundis that the nrepl doesn’t know about the namespace of the current buffer. The issue with nrepl-set-ns (C-c M-n) is that is runningin-ns, which doesn’t bring the clojure core dependencies.In both cases, the work around is to either eval just the
nss-expr of the buffer or to load the whole buffer withnrepl-load-current-buffer.Of course you can modify the nrepl-set-ns to do a
nsor add another fn.