-
-
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
cider-repl-clear-buffer stops working #1252
Comments
Do |
Here is the backtrace:
|
Yeah, that's OK. Personally, I don't use |
@bbatsov here is my version info:
Do you think it would be possible, if you could describe your workflow in a few words? I think that would be very beneficial to me. |
My workflow is to just reload code I just changed by hitting It's clear that one of the repl markers is being set to nil for you, even though all of them should always be valid markers.
|
Is |
No, it's a variable. Try to see it with |
So when I run
for
The same is true for |
Did you do that inside the repl buffer? |
Ah right, my bad, Here are the variables in the buffer.
|
Ok, one more question. :) Is that after reproducing the problem? |
I've captured the variables again after the problem:
|
Alright. Then I think it's safe to say that I am clueless. :) |
Same thing happens even if I use
|
Are you running |
Nevermind, that doesn't seem to affect it. It appears that the first time some code is evaluated the output appears before repl prompt and after |
@scottdw absolutely, that works. If I press enter after each evaluation then the repl can be cleared each time. |
I'm curious as to why experienced users have not encountered this. Do they not use the |
I only use it when the output in the buffer is causing trouble. e.g. when it contains unbalanced parens etc and smartparens is screaming at me. Additionally, it's super unusual to have forms causing side-effects and emitting output to the repl as toplevel forms that get evaluated when calling Steps to reproduce
|
After running cider-repl-clear-buffer and then loading a file creating output (e.g. because it contains println statements) the output would appear in the wrong place, causing the prompt to disappear. The problem was in the function responsible for putting POINT in the right place before emitting evaluation results into the repl buffer. When the prompt was the first line in the buffer, cider-repl--end-of-line-before-input-start didn't move point at all. There's now a special case in place to handle this situation. I initially considered solving this problem by making sure that the prompt wasn't the first line in the buffer, after noticing that he banner was being deleted by cider-repl-clear-buffer. While I think the banner should be preserved by this function, the banner itself is optional so this was a non-solution.
After running cider-repl-clear-buffer and then loading a file creating output (e.g. because it contains println statements) the output would appear in the wrong place, causing the prompt to disappear. The problem was in the function responsible for putting POINT in the right place before emitting evaluation results into the repl buffer. When the prompt was the first line in the buffer, cider-repl--end-of-line-before-input-start didn't move point at all. There's now a special case in place to handle this situation. I initially considered solving this problem by making sure that the prompt wasn't the first line in the buffer, after noticing that he banner was being deleted by cider-repl-clear-buffer. While I think the banner should be preserved by this function, the banner itself is optional so this was a non-solution.
[Fix #1252] Fix breakage in cider-repl-clear-buffer
My
projects.clj
looks like this:I'm pretty new to clojure and cider but when I have the code in one window and
cider-repl
running in the other, it is nice to be able to clear the repl buffer withC-c M-o
butC-c M-o
stops working after I have executed it once and the buffer has been cleared.If I select
cider-repl-clear-buffer
fromM-x
I can see the error message:The following stack trace in the
*Messages*
bufferSo all I do is
cider-jack-in
C-c C-k
to execute it.C-c M-o
and the buffer clearsC-c C-k
to execute it.C-c M-o
again andcider-repl-clear-buffer
no longer works.If nobody else is experiencing this error, I wonder if my workflow of using
C-c C-k
is normal?The text was updated successfully, but these errors were encountered: