Open dotemacs opened 6 years ago
hey @dotemacs,
thanks for putting some thought into this. Regarding option 2, my concern is that I'm not sure what would happen (from the UI perspective) if the current REPL namespace cannot be mapped to any file in the project, i.e.
[1] user=> (ns custom-weird-ns)
> nil
[2] custom-weird-ns=>
I guess we could send the user to the last clojure buffer in this case, but that seems confusing, or raise a warning, but I'm not convinced that would be good UI. Do you have any idea or opinion on this?
Either way, option 1 is still a good thing to merge into spiral!
Hi @volrath
we spoke earlier on Slack about adding the ability to move back from the REPL to the previous buffer, as that functionality doesn't exist currently for
spiral
.spiral-switch-to-repl-buffer
currently only goes one way, from the project buffer to the REPL.Before implementing this feature, there are two options:
cider
's cider-switch-to-last-clojure-buffer, as the name suggests jumps back to the previous project buffer.But there is also a possibility of jumping to the namespace which is currently loaded in the REPL.
The option 1. would essentially emulate
cider
's behaviour, whereas 2. am I just overthinking it?I have the code for both, extracted as separate functions. I wanted to see what would be better to go with before I submit a PR. Thanks