-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Rename on-connection-* into tunnel-* and simplify related code. #756
Conversation
See the discussion we had with @hugoduncan regarding those names #489. There're not optimal I guess, but I don't think your suggestion is an improvement. |
The proposed naming is good because The naming is not perfect because if there will be some other mechanism which would use a helper process which is not a tunnel, it will require a new variable. But how likely is that? If this ever happens you can rename this vars back to I actually think that the configurable variable |
a732fb4
to
764fddc
Compare
I am taking another stab on this. This time I completely removed the customization machinery around ssh tunneling and replaced it with one function I think this simplicity really wins over the alternative of the unlikely-to-be-used customization and confusing names. |
@Vitoshka That's fine by me if it's fine by @hugoduncan. I can't think of other realistic use cases for this so the change makes sense to me. |
As long as cider-jack-in in a tramp buffer still works, fine with me. |
@Vitoshka You'll have to rebase this. |
If there are other general use cases then we should code them into If some user would want something very specific then he can always use |
Rebased on #792 to avoid any further complications. |
- remove configurable nrepl-connection-endpoint - nrepl-connection-endpoint is now a function that returns the endpoint (either ssh or plain) - nrepl-on-connection-buffer is now nrepl-tunnel-buffer
Rename on-connection-* into tunnel-* and simplify related code.
The names
on-connection-buffer
andon-connection-process
are pretty confusing. They provide tunneling and are unlikely to be used for anything else, so let's name them as such.Some simplification/clarification of the code and documentation were made here and there and
nrepl-connection-endpoint
returns the process instead of the process' buffer-name. I think it's good to work with first principles whenever possible.I have also increased the process-wait-for-output timout to .05. On some machines, keeping it very low makes Emacs pinging continuously up to the point that C-g doesn't work anymore. This happens mostly on windows but people reported this on linux as well. It doesn't harm to have it higher in this particular place. It's far from noticeable and the process returns faster on any input anyways. Better safe than sorry.