-
-
Notifications
You must be signed in to change notification settings - Fork 44
[Fix #116] Set inf-clojure-buffer REPL type on detect #119
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
[Fix #116] Set inf-clojure-buffer REPL type on detect #119
Conversation
f01e1c5
to
d18dd8d
Compare
This was indeed easy, style can be improved because |
inf-clojure.el
Outdated
(let ((detected-type (inf-clojure--detect-repl-type proc))) | ||
(with-current-buffer inf-clojure-buffer | ||
(setq inf-clojure-repl-type detected-type)) | ||
(setq inf-clojure-repl-type detected-type)) |
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.
Why do we need to set the REPL type in the source buffer? We can always infer this from the REPL buffer for the project.
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.
Uhm are there any implications in terms of performance in getting the buffer and from it the value for every operation? Remember this is done on each key press (for completion). If not I can change things, but this patch was definitely easier.
I think also that removing the buffer local would work but I was thinking that at some point we should have more than one repl (per project) so I don't know how it work then.
d18dd8d
to
b401c82
Compare
I updated the code and also notice that we have a |
b401c82
to
4b5d5df
Compare
4b5d5df
to
22f80c4
Compare
CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ | |||
* [#83](https://github.com/clojure-emacs/inf-clojure/pull/85): No such namespace: complete.core in lumo REPL. | |||
* [#93](https://github.com/clojure-emacs/inf-clojure/pull/93): Slow response from inf-clojure (completions, arglists, ...). | |||
* [#101](https://github.com/clojure-emacs/inf-clojure/pull/101): `inf-clojure-set-ns` hangs Emacs. | |||
* [#119](https://github.com/clojure-emacs/inf-clojure/pull/119): Send REPL string always, even if empty. |
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 think you put to wrong changelog entry here.
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.
Yep I renamed things and forgot it, will do
22f80c4
to
d6daf9d
Compare
Now the code sets the inf-clojure-repl-type buffer local var in the inf-clojure-buffer when a REPL type is detected. This solves the weird errors that were happening when working within the REPL buffer because inf-clojure-repl-type is nil.
d6daf9d
to
829fbe6
Compare
Now the code sets the
inf-clojure-repl-type
buffer local var in theinf-clojure-buffer
when a REPL type is detected. This solves the weird errors that were happening when working within the REPL buffer becauseinf-clojure-repl-type
is nil.Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
M-x checkdoc
warnings