-
Notifications
You must be signed in to change notification settings - Fork 77
Fix sending of long code strings to REPL using temporary files (#89) #122
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
base: master
Are you sure you want to change the base?
Conversation
Is there anything that can be done (besides fixing the merge conflicts) to get this PR merged? I am running into issues with long buffers and would like to see this merged into the main repo. I am willing to help if anything is needed. |
Hi, please accept my apologies, this PR somehow flew under the radar for me. I think this feature has to be off by default, because sending via tempfiles won't work over network. Alternatively, it could be on by default for macOS, and off by default otherwise. Also, could the Lua part be simplified a bit?
|
I believe this feature should be on by default on Windows too. I made this PR initially because I had problems on Windows. |
Oh, then I was wrongly under impression that it was about macOS! Then yes, it should be on by default for Windows. |
I just wanted to leave a short note based on my experience with Aquamacs (though I think it's not specific to Aquamacs) and the temporary file code (as posted in 9eddee) which I think needs a fix. The name of every temporary file written by If you think this is an issue that's worth fixing (I personally do think so) leave a comment here. The fix I use is so simple (using a global var to store the name) that I doubt it's worth forking but I can do a fork if you think it's of any use. |
You could also consider simplifying the part of (process-send-string
lua-process
(format "local tmp = '%s'; local _, e = pcall(function () dofile(tmp) end);
if e then error(e) end; os.remove(tmp)\n" tmp-file)) which for me seems to work well and inserts way less text into the lua REPL. |
RE: what platforms is this relevant to, the default LUA_MAXINPUT is 512 for all platforms: https://www.lua.org/source/5.4/lua.c.html#LUA_MAXINPUT |
Now we will try to handle long chunk strings (> 500 characters) via temporary files.