hylang / hy-mode

Hy mode for Emacs
GNU General Public License v3.0
191 stars 47 forks source link

Hy terminal seems to get blocked up by async printing #73

Closed riatzukiza closed 6 years ago

riatzukiza commented 6 years ago

When using the hy command as a terminal with async operations, soon as something is printed, I cannot enter any input to hy with out with out escaping out, like there is an incomplete expression

;; ...sent in a bunch of text with emacs funcions, some are async events.
=> ... ... ... ... => => ... ... ... => => Logged in as
Duck
449279570445729793
(print "yo") ;; I try running another command after the async

  C-c C-c=> (print "yo")
yo
=> 
riatzukiza commented 6 years ago

I meant to write this to https://github.com/hylang/hy/issues

tsukimizake commented 5 years ago

Hi. I tried hy-mode and botherd by freeze when opening .hy file. In most cases, the freeze can be dealt with C-c, but sometimes whole emacs gets frozen. I figured out that loading many lines of code to hy repl at once results in broken input like

(set(set(set(setsetv monty 1)

, and it is parsed as if there should be more close parens. And once it happens, as the repl wants rest of the S-exp, it always returns '...' just as this issue.

Seems like it's a problem of hy repl (or python repl? according to the discussion in https://github.com/hylang/hy/issues/1628), but maybe we can avoid it by splitting input to chunks or something.

My environment is OSX 10.14.4, python 3.7.3, hy 0.16.0, hy-mode 20190310.1721. This issue also reproduces on my friend's Arch linux, only when using virtualenv.

ekaschalk commented 5 years ago

I figured out that loading many lines of code to hy repl at once results in broken input

Can you provide the command you used to send the code and the code itself so I can reproduce it?