joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.26k stars 142 forks source link

Flaky REPL bug binds `,` to `self-insert-command` #462

Closed nagy closed 3 years ago

nagy commented 3 years ago

I am encountering a flaky bug inside the REPL, it is not immediately reproducible. Sly sometimes seems to switch into another weird state where the , key is not bound to sly-mrepl-shortcut anymore and completion ( with company ) requires manual triggering.

Please bear with me since this sometimes can need up to 10 tries to be able to show up. I just tested it with the current sly master branch.

$ emacs --version
GNU Emacs 28.0.50
$ sbcl --version
SBCL 2.1.2.nixos
$ cd sly
sly $ emacs -Q -nw -L . -l sly-autoloads --eval '(setq inferior-lisp-program "sbcl")' -f sly

Steps to reproduce

Open Emacs like above.

Then type '() and hit RET . Now type M-p to get the last entry again and hit RET again.

Now sometimes sly is in this weird state where the following seems to be the case:

I cannot seem to reproduce it with anything that does not contain parentheses. Also the second line needs to come from going back in the REPL history by hitting M-p. When you type this empty list in again for the second line, I cannot get this behaviour to show up. If it does not show up for you, please restart Emacs and try again up to 10 times or so.

My .sbclrc is empty. Is this reproducible for you? Can I help out with this some way? If you cannot reproduce it, I can try to find a more reliable way.

Screenshot 1 (buggy state)

I am able to insert the comma just by pressing ,. The sly-mrepl-shortcut command does not show up.

buggy

Screenshot 2 (working state)

Here, by pressing , the sly-mrepl-shortcut shows up.

working

joaotavora commented 3 years ago

Thanks. I think this is still fallout from the recent commit concerning identification of comment syntax. I'll try to reproduce. If might be easier once you have a lot of repl output, which something like (ql:quickload :somepackage) could produce.

joaotavora commented 3 years ago

I can now reproduce this consistently

joaotavora commented 3 years ago

This is a duplicate of #459 which isn't fixed.

nagy commented 3 years ago

Okay, thank you very much. I guess you already know, but after a bit more testing the earliest commit which allowed me to reproduce this was fa6076c8, which is the commit about the comment syntax you talked about.

joaotavora commented 3 years ago

OK closing and continue to handle in #459