sanel / monroe

Clojure nREPL client for Emacs
161 stars 21 forks source link

Fix multiple connections for Emacs-26 and below #34

Closed bbuccianti closed 3 years ago

bbuccianti commented 4 years ago

I don't understand entirely monroe-net-filter, but after a lot of debugging on emacs 26.3 and emacs 27.0.91, I came to the conclusion that ignore-errors was causing that monroe doesn't dispatch all decoded messages. I think this fixes the issue with previous versions of emacs, although I would really like that folks test it.

Cheers!

bbuccianti commented 4 years ago

I think the error about a non existent hash-table-empty-p function has been solved definitely in last commit.

bbuccianti commented 4 years ago

Maybe I didn't explained the changes properly. I'm telling that ignore-errors was causing that monroe doesn't dispatch all decoded messages but that's half the true. It seems that ignore-errors was hiding the actual error, which is that hash-table-empty-p function wasn't when there when needed. That's why, after (require 'subr-x) the problem has gone. I think that with-demoted-errors macro help us to avoid in the future if some kind of error happen, we can now for sure what's happening. With ignore-errors was really hard for me to lookup what was happening.

bbuccianti commented 4 years ago

@sanel can you test on emacs 26.3?

bbuccianti commented 4 years ago

Maybe this commit messages has better explanations than before.

sanel commented 3 years ago

Sorry @bbuccianti for delayed reply. I'll merge this and see how it works

sanel commented 3 years ago

Thanks!