简体   繁体   中英

Evaluate Clojure namespace in *nrepl* buffer in emacs

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 Cc Ce 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 Cc Ce ? 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.

Type Cc Mn:

https://github.com/clojure-emacs/nrepl.el

Switch the namespace of the repl buffer to the namespace of the current buffer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM