cider-ns-form-p
produces false positive when the form contains namespace-like string.
#3754
Labels
cider-ns-form-p
produces false positive when the form contains namespace-like string.
#3754
Hi, while working on https://github.com/scicloj/clay (we have Clojure file parser tests there) I hit a problem, so
I have code like this in a file
Expected behavior
foo evals to
#'wtf/foo
Actual behavior
#'user/foo
Steps to reproduce the problem
put the code above into a file, start repl, eval it in cider
Environment & Version information
CIDER version information
Lein / Clojure CLI version
Babashka 1.3.191
Emacs version
29.4
Operating system
Ubuntu 22.04
JDK distribution
Babashka 1.3.191
The problems is the regex used in
cider-ns-form-p
-"^[[:space:]]*\(ns\\([[:space:]]*$\\|[[:space:]]+\\)"
treats namespace in a string as a real namespace, socider-interactive-eval
evals it inuser
namespace instead of the current one.I tried to fix it by myself but unfortunately, Emacs regexes don't support look ahead, so probably we should discuss the way it should be fixed.
The text was updated successfully, but these errors were encountered: