Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cider-eval-defun-at-point doesn't work properly if there is a space in the beginning of namespace declaration #3009

Closed
mattiuusitalo opened this issue Apr 28, 2021 · 2 comments

Comments

@mattiuusitalo
Copy link

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

@mattiuusitalo
Copy link
Author

This is actually because of clojure-mode, not CIDER. clojure-find-ns returns nil in this case.

@bbatsov
Copy link
Member

bbatsov commented Apr 29, 2021

Yep. Please, report the issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants