websocket.el 0.91 not working with Emacs 23
tkf opened this issue · 5 comments
You can check it by running websocket-functional-test.el.
I checked in Emacs 23.1.1
It seems Emacs 23's open-network-stream
does not have the optional PARAMETERS argument:
https://github.com/emacsmirror/emacs/blob/emacs-23/lisp/subr.el#L1757
https://github.com/emacsmirror/emacs/blob/master/etc/NEWS#L1887 (News in Emacs 24)
Sorry for the mistake, and thanks for bringing this to my attention. Should be fixed with eef37ba. Please try it out.
Thanks for the quick fix! However, it does not work in Emacs 23.3.1 because it has tls.el but open-network-stream
takes less arguments. What I would do is to use make-network-process
always for "ws" and open-network-stream
for "wss", and catch wrong-number-of-arguments
error using condition-case
to re-raise error about Emacs version.
This is how I checked:
emacs -Q -batch -L . -l websocket-functional-test.el
succeeds but
emacs -Q -batch --eval "(require 'tls)" -L . -l websocket-functional-test.el
fails.
I see, checking for 'tls isn't a good method. That's a shame. I'll fix this tonight. BTW, I'll be on vacation for half a week starting tomorrow. You have commit access, so if something is wrong and you want it fixed in that time, please feel free to commit a fix yourself.
Thanks again for the suggestion, I just implemented the solution you described in commit 88718f0.
Thanks. Have a nice vacation!