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

Change the semantics of cider-quit and cider-restart. #732

Closed
vspinu opened this issue Aug 14, 2014 · 3 comments
Closed

Change the semantics of cider-quit and cider-restart. #732

vspinu opened this issue Aug 14, 2014 · 3 comments

Comments

@vspinu
Copy link
Contributor

vspinu commented Aug 14, 2014

cider-quit closes all cider sessions by default and it easy to close all projects at once by mistake. I think it should work the other way around: by default close only the current session, and with C-u prefix close all CIDER sessions. y-or-n query should not be necessary in either case.

I think this is what C-c C-q does everywhere else in emacs. So it's a pretty standard behavior.

cider-restart quits all sessions but restarts only the current session. This is clearly a bug but it is suggestive that behavior should be similar to cider-quit: by default restart the current session, with C-u restart all session.

@bbatsov
Copy link
Member

bbatsov commented Aug 15, 2014

I'm well aware of this, but as helper buffers and repl buffers are not associated with a connection directly presently we cannot determine exactly which buffers to kill alongside the current connection buffer.
This is related to our discussion in #700.

@bbatsov
Copy link
Member

bbatsov commented Dec 7, 2014

#912 reminded me of this. Now that the REPL buffer is also the connection buffer this is definitely doable.

@vspinu
Copy link
Contributor Author

vspinu commented Dec 7, 2014

BTW, I think the expression connection buffer is misleading. It seems to me that nrepl-server process and buffer should be part of the connection1 concept as well. cider-restart/quit operates on connection as a whole, not only on client-buffer/process.

The code and documentation would become clearer if we can use client-buffer/process (=client-connection), server-buffer/process (=server-connection) and connection (client + server) trichotomy throughout. Actually, we are already using this convention in several places in nrepl-cleint.el.

The complication, of course, is that server-connection is not always there on emacs side. Thus functions that operate on the whole connection should have a warning that they operate on the client side only if server side is absent.

@bbatsov bbatsov closed this as completed in 534e621 Jul 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants