Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs Live - Namespace not found

Tags:

emacs

clojure

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.

like image 333
Cubic Avatar asked Nov 01 '12 22:11

Cubic


1 Answers

The issue with Namespace not found is 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 running in-ns, which doesn't bring the clojure core dependencies.

In both cases, the work around is to either eval just the ns s-expr of the buffer or to load the whole buffer with nrepl-load-current-buffer.

Of course you can modify the nrepl-set-ns to do a ns or add another fn.

like image 138
DanLebrero Avatar answered Oct 23 '22 18:10

DanLebrero