Comments (6)
I found a few places (nrepl-interactive-eval
and friends) that were checking nrepl-buffer-ns
which was incorrectly set to "user"; replacing those references with a call to (nrepl-current-ns)
fixed the problem, but I'm not sure if it's the correct solution; it's probably better to just ensure nrepl-buffer-ns
is set correctly.
from cider.
If you add (setq nrepl-buffer-ns (nrepl-current-ns))
to nrepl-interaction-mode
's definition, the namespace will be set correctly when you open an existing Clojure file.
However, I think we ought to do away with nrepl-buffer-ns
altogether. The difficulty of correctly maintaining its state is not worth the benefit. Because nrepl-current-ns
uses it as an optimization to prevent a call to clojure-find-ns
, if you change the current buffer's namespace, even nrepl-current-ns
will return an incorrect value.
from cider.
Yeah, makes sense to me.
from cider.
This is trickier than I thought.
nrepl-buffer-ns
is sent to the nREPL server for the interactive-eval calls. Simply replacing it with a call to nrepl-current-ns
will cause a NPE on the server side if the namespace has not yet been defined.
from cider.
The above pull request adds the functionality requested by Alexander.
I've come to accept that it makes sense to have an nrepl-buffer-ns
variable. SLIME uses a similar variable. However, it is confusing to have both a variable and a function that are named similarly that serve slightly different purposes.
from cider.
Good point, probably nrepl-current-ns should be renamed.
from cider.
Related Issues (20)
- How do I cancel debugger-marked items? HOT 1
- State of CIDER survey? HOT 8
- Completion can trigger unwanted user prompts HOT 5
- `cider-docstring--format` breaks some formatting HOT 16
- Rename private functions in `cider-docstring.el` to have proper prefix HOT 4
- Unable to boot cider off a fresh corgi install? HOT 23
- cider using scittle nREPL doesn't send forms to REPL HOT 14
- Remove all code related to sideloading HOT 2
- Fringe indicators for sucessful/failed tests HOT 1
- Defining a now-deprecated variable `x-gtk-use-system-tooltips` HOT 8
- Issue with refresh operation after updating to nrepl `1.3.0-beta2` HOT 15
- cljs repl switches to previous ns after cider-repl-set-ns change followed by single eval (again) HOT 7
- Weird debugger behavior, not firing on some cases
- CIDER connects to remote nrepl server instead of localhost HOT 3
- `cider-pprint-eval-last-sexp-to-comment` forgets "Elapsed time"
- Remove support for sideloading HOT 3
- `cider-doc` not recognize the right function. HOT 3
- add-lib fails when called from CIDER repl HOT 8
- CIDER trace should return inspectable data (not text) HOT 1
- Evaluating a value with custom print has weird behavior
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cider.