Skip to content

cider-repl-set-ns has become artificial #909

@johnbendi

Description

@johnbendi

C-c M-n temporarily sets ns which gets reset to cljs.user after evaling an expression.

foo.bar.ns > (+ 1)
1
cljs.user >

On closer look. My suspicion seems confirmed:

(defun cider-repl-set-ns (ns)
  "Switch the namespace of the REPL buffer to NS.

If invoked in a REPL buffer the command will prompt you for the name of the
namespace to switch to."
  (interactive (list (if (or (derived-mode-p 'cider-repl-mode)
                             (null (cider-ns-form)))
                         (completing-read "Switch to namespace: "
                                          (cider-sync-request:ns-list))
                       (cider-current-ns))))
  (if ns
      (with-current-buffer (cider-current-repl-buffer)
        (setq nrepl-buffer-ns ns)
        (cider-repl-emit-prompt (current-buffer)))
    (error "Cannot determine the current namespace")))

Also calling in-ns from the repl gets the job done. So somewhere along the line something like in-ns doesn't get called.

ielm => (cider-version)
"CIDER 0.8.2snapshot (package: 20141130.803)"

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions