Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dgutov
Copy link
Contributor

@dgutov dgutov commented Mar 14, 2024

Resolves #2303

@dgutov
Copy link
Contributor Author

dgutov commented Mar 14, 2024

I've tried to add an integration test of sorts, but the "No live threads left" error got the better of me.

@dgutov
Copy link
Contributor Author

dgutov commented Mar 14, 2024

@andrehjr Check this out.

@dgutov dgutov force-pushed the dumb_terminal_input branch from 45b2cf4 to fbcec7c Compare March 21, 2024 15:12
@andrehjr
Copy link
Member

Hi @dgutov I've made some additional changes on your PR. Can you try it?

Investigating a bit more, it seems this issue only happens when Reline is used in Pry as input (Ruby 3.3+). When I've tried emacs on the shell with older versions of ruby there was no issue.

I think this code might be removed if ruby/reline#660 changes how Reline treats TERM=dumb, but for now, it solves the echoing issue.

@dgutov
Copy link
Contributor Author

dgutov commented Mar 23, 2024

@andrehjr This works for me, thank you. This particular issue indeed seems Reline-specific (there were other bugs before, also related to Reline, but in the context of Pry IIUC they were triggered only with Rubies compiled without libreadline, so those should be covered as well).

Thanks for the link, I guess ruby/irb#907 also helped with that.

Speaking of the difference in solution, I think switching to SimpleStdio whenever the terminal is dumb and the user didn't choose any other input explicitly, makes a bit more sense conceptually, since it also covers unknown unknowns. But I don't mind the difference that much, and maybe we'll have a working Reline inside Emacs not too far off in the future.

@dgutov
Copy link
Contributor Author

dgutov commented May 1, 2024

@andrehjr Ping.

@andrehjr
Copy link
Member

andrehjr commented May 1, 2024 via email

@jonswar
Copy link

jonswar commented Jul 9, 2024

Ping on this thx!

@andrehjr andrehjr merged commit 169e5b0 into pry:master Jul 10, 2024
@andrehjr andrehjr mentioned this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When used inside Emacs with Reline, input is echoed

3 participants