cider-eval-defun-at-point doesn't work properly if there is a space in the beginning of namespace declaration
mattiuusitalo opened this issue · 2 comments
Expected behavior
Evaling the defun works normally
Actual behavior
I get compile errors about undeclared vars, declared vars end up in "user" namespace
Steps to reproduce the problem
Create a namespace with space in the namespace declaration, like this:
(ns foo) ; space as the first character
(defn bar [] 1)
eval defun at point for the function "bar". I can instantly see the foo was declared in "user" namespace. I expected it to end up in "foo" namespace. If I require stuff in the namespace declarations, I can't refer to the declarations because I get compile errors
Environment & Version information
CIDER version information
;; CIDER 1.1.0 (package: 20210422.802) (Plovdiv), nREPL 0.8.3
;; Clojure 1.10.1, Java 11.0.1
Lein/Boot version
Leiningen 2.9.0 on Java 11.0.1 Java HotSpot(TM) 64-Bit Server VM
Emacs version
GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02
Operating system
Mac OS Mojave
This is actually because of clojure-mode, not CIDER. clojure-find-ns returns nil in this case.
Yep. Please, report the issue there.