nonsequitur / inf-ruby

218 stars 69 forks source link

emacs 26.3: inf-ruby hangs with downward-triangle prompt #130

Closed stuart-little closed 4 years ago

stuart-little commented 4 years ago

I am running emacs 26.3 on Arch linux, and have installed ruby 2.7.0p0 and irb 1.2.1 from that distro's repos. Running irb in a terminal works fine.

I have inf-ruby installed from MELPA.

In emacs, run-ruby opens a buffer but the prompt is not the usual

irb(main):001:0>

Rather, it's a single triangle pointing down. Entering arbitrary commands simply moves me to the next line producing no output.

If I try to exit with C-x C-c I get a warning that a process is running, started with the expected command

irb --prompt default --noreadline -r irb/completion

This looks in order, and that command runs fine in a terminal. It's also identical to what I see on systems where inf-ruby does work.


Edit:

I think this is along the lines of #128: the same triangle prompt is mentioned there.

Neither the --legacy option nor --inf-ruby-mode for irb help.

dgutov commented 4 years ago

Like mentioned in the comments in the other issue, --nomultiline should work.

stuart-little commented 4 years ago

It did, thank you!

The prompt appears now, and one can interact with the REPL. There's a small annoyance in that after the print stage of the loop you're not returned to the prompt: you have to press an extra enter..

It's much better than before though, thanks!

dgutov commented 4 years ago

There's a small annoyance in that after the print stage of the loop you're not returned to the prompt: you have to press an extra enter

Yup! And I have no idea what to do with that one.

If anybody has a suggestion, or can liaison with irb developer(s), that would be welcome.

dgutov commented 4 years ago

In the meantime, I'll push a patch that should take care of the hanging problem.

Please feel free to create a new issue for the "extra enter" one.