-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elnode is unusable on Emacs 26+ #106
Comments
In the meantime, overriding the method ;; Elnode doesn't work on Emacs 25.1+, because it sets both the `:server` and
;; `:nowait` flags. They can't both be set on Emacs 25.1+, so `:nowait` has to be
;; dropped.
;;
;; Make sure the patch is applied *after* elnode is loaded.
(with-eval-after-load 'elnode
(defun elnode/make-service (host port service-mappings request-handler defer-mode)
"Make an actual TCP server."
(let ((an-buf (get-buffer-create "*elnode-webserver*")))
(make-network-process
:name "*elnode-webserver-proc*"
:buffer an-buf
:server t
;; This flag is the only change in the patched in this version of the method.
:nowait nil
:host (cond
((equal host "localhost") 'local)
((equal host "*") nil)
(t host))
:service port
:coding '(raw-text-unix . raw-text-unix)
:family 'ipv4
:filter 'elnode--filter
:sentinel 'elnode--sentinel
:log 'elnode--log-fn
:plist (list
:elnode-service-map service-mappings
:elnode-http-handler request-handler
:elnode-defer-mode defer-mode))))) |
The MELPA Recipe has been updated in leui of inactivity: melpa/melpa#6184 Active fork here: https://github.com/jcaw/elnode @nicferrier - I've given you push access to the forked Repo. Let me know if you'd like to move it back here when you have more time. |
Because of a quirk in how Emacs 25.1+ creates network processes, the flags
server
andnowait
cannot both be set inmake-network-process
. Elnode sets both.On Emacs 26.1, this is formalised and supplying both flags results in an error. This makes Elnode unusable on Emacs 26.1+. It crashes when it tries to start the server.
There's an open pull request, #105, which appears to fix this issue.I've opened two pull requests to fix this, one for Master (#107) and one for MELPA (#108).
The text was updated successfully, but these errors were encountered: