After creating a project with lein new, I open my core.clj in emacs and launch nrepl.
The *nrepl* buffer shows up and looks something like this:
; nREPL 0.1.6-preview
user>
Okay, but now I want to change the namespace, so I decide to evaluate or C-c C-e the namespace expression. Assume the expression in core.clj looks something like this:
(ns my-project.core)
Yet, nothing happens in the *nrepl* buffer. If I want, I can evaluate the namespace expression by entering it directly inside the *nrepl* buffer, and everything runs smoothly.
My question is: Why wouldn't I be able to evaluate a namespace expression by using C-c C-e? And if this is the normal, and correct behavior, I would like to know its rationale as well as an elisp workaround to get my desired behavior.
(in-ns 'my-project.core)or the short-cut of Michiel's answer-