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.
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.
#912 reminded me of this. Now that the REPL buffer is also the connection buffer this is definitely doable.
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.
connection (client + server)
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.
[Fix #732] Change the semantics of cider-quit and cider-restart
By default now they operate only on the currently active connection.
With a prefix argument they operate on all connections.