You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When used inside Emacs with Reline, input is echoed #644
But there doesn't seem to be any interest in having this solved inside Reline (i.e. providing a "simple" io driver).
What are your expected behavior and actual behavior of your environment?
The expected behavior is that the input is not copied or otherwise reproduced in the output.
This problem come up more often now than Ruby 3.3 defaults to Reline.
Terminal Emulator
Comint inside Emacs.
IRB has a workaround: when launched with --nosingleline --nomultiline, it switches to a different I/O implementation, which it calls StdioInputMethod.
Should Pry carry its own solution like that as well? The hackish patch below seems to do the trick. It can be a configuration option, a separate wrapper class, etc.
@@ -179,7 +179,10 @@
end
end
- if readline_available?+ if ENV['TERM'] == 'dumb'+ STDOUT.print(current_prompt)+ STDIN.gets+ elsif readline_available?
set_readline_output
input_readline(current_prompt, false) # false since we'll add it manually
elsif coolline_available?
changed the title [-]When used inside Emacs with Reline (e.g. Ruby 3.3 by default), input is echoed[/-][+]When used inside Emacs with Reline, input is echoed[/+]on Mar 14, 2024
@dgutov can you point the new one? I encounter these problems in Emacs and am also confused between irb, debug, reline, etc, etc, etc. Happy to follow your investigation.
Irb has its own way of disabling Reline, so see the above and the linked PR for a similar solution for Pry.
Not sure about debug, haven't tested that yet.
Perhaps Reline itself should have a "dumb" backend with automatic switchover, or a fix for this some other way, but I don't understand the code enough to suggest anything in particular.
Activity
[-]When used inside Emacs with Reline (e.g. Ruby 3.3 by default), input is echoed[/-][+]When used inside Emacs with Reline, input is echoed[/+]dgutov commentedon Mar 14, 2024
Sorry, wrong repo.
freesteph commentedon Mar 21, 2024
@dgutov can you point the new one? I encounter these problems in Emacs and am also confused between irb, debug, reline, etc, etc, etc. Happy to follow your investigation.
dgutov commentedon Mar 21, 2024
@freesteph See pry/pry#2303.
Irb has its own way of disabling Reline, so see the above and the linked PR for a similar solution for Pry.
Not sure about
debug, haven't tested that yet.Perhaps Reline itself should have a "dumb" backend with automatic switchover, or a fix for this some other way, but I don't understand the code enough to suggest anything in particular.
dgutov commentedon Sep 24, 2024
Update for those coming from search results: