Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Jump from the REPL to the namespace or previous project buffer? #11

Open
dotemacs opened this issue Feb 28, 2018 · 1 comment
Open

Jump from the REPL to the namespace or previous project buffer? #11

dotemacs opened this issue Feb 28, 2018 · 1 comment

Comments

@dotemacs
Copy link

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:

  1. cider's cider-switch-to-last-clojure-buffer, as the name suggests jumps back to the previous project buffer.

  2. 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

@volrath
Copy link
Owner

volrath commented Feb 28, 2018

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!

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

No branches or pull requests

2 participants