-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
ruby-send-region fails on long single command #172
Comments
The same test behaves just fine when I use |
For context, these 4k blocks may be connected with PTY process connection type. Some terminal implementations forcefully chunk input into 4k segments. So, changing the process connection type (if is it at all possible), might be the solution. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6149 for details. |
It should use pty already, as long as I wonder what difference could using Pry make. Otherwise, yes, the string length is just above this limit above, so it seems related. |
In the original report [1], the problem only occured in NixOS. @mikelygee, can you check the value of [1] https://list.orgmode.org/orgmode/980379b9-3b1c-7671-839a-60fa488eed7c@gmail.com/ |
I also see two bindings for |
Dmitry Gutov ***@***.***> writes:
I also see two bindings for `process-connection-type` inside the Org codebase, but they seem to be on different execution paths. Correct me if I'm wrong, though.
You are right. They are for (1) connecting to child Emacs process during
export; (2) running xdg-open when opening file links, which had some
bugs with the default t value.
ob-ruby simply relies upon `comint-send-input`.
…--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
|
It is t. I have found that |
Using
In contrast, |
The difference is likely due to the method: |
So... there is no difference between Irb and Pry, in the context of this problem? Unless somebody has better ideas, we could indeed revert to measuring the spans chars without newlines, and if one exceeds 4096, show an error to the user instead. Maybe upstream (Emacs) does that first, though. |
I can confirm I get the same issue on emacs on debian, with both irb and pry. with process-connection-type as its default t. But I think there is a misunderstanding here, it is pty on linux that truncates lines to 4096. Setting |
Should be fixed with #175. |
I ran into this using org babel to pass a table to a ruby block.
I had no problems with it on a Windows machine, but the operation hung on my linux system.
org generates the ruby code below to pass the table. If I paste this into an inf-ruby buffer, it is interpreted correctly. However, when I select it and run
(ruby-send-region)
, I get an "unexpected end-of-input". As far as I can tell,process-send-region
is sending the region in chunks. As soon as it sends the first 4k characters of the region, it look s like inf-ruby is trying to interpret it, and fails because it is missing the full line.The text was updated successfully, but these errors were encountered: