-
-
Notifications
You must be signed in to change notification settings - Fork 44
Function to select repls as the current active connection #190
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Conversation
ca9301e
to
3aad040
Compare
very simple: if in a repl, use that. if not in a repl, display a list of inf-clojure process buffers. If given a prefix, always show a list. Makes running simultaneous repls far easier
3aad040
to
22ffacd
Compare
inf-clojure.el
Outdated
repls and offer a choice. Recommended to rename buffers as they | ||
are created with `rename-buffer`." | ||
(interactive "P") | ||
(cl-flet ((inf-clojure-repl-p () (and (derived-mode-p 'inf-clojure-mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest having this and a inf-clojure-repls
fucntion to be top-level functions. I can imagine they'd be useful in some other situations as well.
Nice little change indeed. Might also be a good idea to update the modeline for |
Looks like I will have to try inf-clojure again 😃 Good idea here! |
note this changes the `inf-clojure-buffer` to always be a _buffer_ and not the name of a buffer. Seems like renaming can be quite risky since it was just a name of the buffer rather than the buffer.
Nice! |
Helpful little function to ease the use case of multiple connections. There's a global connection that all commands use:
inf-clojure-buffer
. Changing this allows using different connections. This function just sets that to current buffer if in a repl, shows a list of live process inf-clojure repls if not, and if given a prefix, always shows a list so you can switch even if you're currently in a repl. The repl type is in a defvar-localinf-clojure-repl-type
so that doesn't need to be set or re-inferred.Renaming buffers with projects and repl types makes this quite nice, and the dead simple way it works means that things can be evaluated from any buffer (project irrespective) and no edge cases like last focused buffer or anything like that.