-
-
Notifications
You must be signed in to change notification settings - Fork 45
Cleanup socket repl startup. #212
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
Cleanup socket repl startup. #212
Conversation
** How to use: ** To use one of the defaults defined in `inf-clojure-socket-repl-startup-forms`, just `m-x inf-clojure-socket-repl` and choose your startup. To add your own custom startup ```emacs-lisp (setq inf-clojure-custom-startup "clojure -J-Dclojure.server.repl=\"{:port %d :accept clojure.core.server/repl}\" -A:grepl") ``` This will prompt you for a repl type so it's useful to also include ```emacs-lisp (setq inf-clojure-custom-repl-type 'clojure) ``` Or set these in a .dir-locals.el file for each project with ```emacs-lisp ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((nil . ((inf-clojure-custom-startup . "clojure -J-Dclojure.server.repl=\"{:port %d :accept clojure.core.server/repl}\" -A:grepl") (inf-clojure-custom-repl-type . clojure)))) ``` ** things i changed ** - added `(defvar inf-clojure-custom-repl-name nil)`. This was originally used but never defined so socket startup and inf-connect would fail. This also was not honored and now controls the repl buffer name. - removed `inf-clojure-socket-repl-type`. This was also used and never defined so it also caused startup to fail. But we already have a notion of `inf-clojure-custom-repl-type` so we can just reuse that. There's nothing special about it being the socket repl type for connect. - simplified the buffer startup mechanism. Lots of `let` bindings - added `inf-clojure--suppress-connect-message-p`. Ostensibly private, others can use it. But two things are sending messages: how we start the clojure process, and that we connected to the clojure process. I think how we start the clojure process is the far more important one as it includes port information, aliases, etc.
Seems I didn't pay close enough attention the PR that introduced those changes. My bad! Your PR looks good to me overall, apart from my small comments. Also I've noticed the following in the CI log:
Seems those warnings got obscured by the test that has been failing for a while. Probably we should comment it out at this point. |
I want to fix up all of the lint errors but I really don't understand the one that is complaining about the regex |
full lint run:
|
Fixes: #211
How to use:
To use one of the defaults defined in
inf-clojure-socket-repl-startup-forms
, justm-x inf-clojure-socket-repl
and choose your startup.To add your own custom startup
This will prompt you for a repl type so it's useful to also include
Or set these in a .dir-locals.el file for each project with
things i changed
(defvar inf-clojure-custom-repl-name nil)
. This was originally used but never defined so socket startup and inf-connect would fail. This also was not honored and now controls the repl buffer name.inf-clojure-socket-repl-type
. This was also used and never defined so it also caused startup to fail. But we already have a notion ofinf-clojure-custom-repl-type
so we can just reuse that. There's nothing special about it being the socket repl type for connect.let
bindingsinf-clojure--suppress-connect-message-p
. Ostensibly private, others can use it. But two things are sending messages: how we start the clojure process, and that we connected to the clojure process. I think how we start the clojure process is the far more important one as it includes port information, aliases, etc.cc: @jakub-stastny @mikepjb