-
Notifications
You must be signed in to change notification settings - Fork 108
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
socket repl on emacs eats whitespace #288
Comments
Used wireshark to observe the associated network traffic for:
What showed up as transmitted was:
Doesn't that suggest the problem is occurring before arcadia is receiving the data? |
I just tried with a direct telnet connection to port 37220 and got the correct count -- 9 instead of 3. |
Using edebug on inf-clojure lead to some searching, which turned up: inf-clojure--make-single-line removes consecutive spaces in strings. Ordinary sending from the repl in inf-clojure seems to involve at least the following chain of calls:
It seems that inf-clojure may be one of the culprits here... |
@timsgardner If you can still reproduce this and it's still relevant for you, may be you'd be interested in a change I'm testing for inf-clojure. The change is a modification to inf-clojure--send-string to not send a sanitized string, but rather to just send the original string with a newline appended:
So far it seems ok here. |
When a region that contains two forms is sent, it appears necessary to send an extra newline to trigger processing of the second form. Analyzing the socket repl code, it seems that data-available? is returning a falsey value so read doesn't get triggered for the second form. Is this appropriate? I got the impression that data-available? tries to check whether there is any more data on the network stream to read, but this doesn't seem to work in this type of case. Would it work to check if there is anything in the LineNumberingTextReader *in* instead? |
The text was updated successfully, but these errors were encountered: