atomic-chrome
atomic-chrome copied to clipboard
Error (use-package): atomic-chrome :config: Cannot bind server socket: Permission denied
After emacs started, as the title said, I can not use this package. How to fix this? Is it relative with the port?
@zhixing2017
This package tries to open the port 64292 for Atomic Chrome and 4001 for Ghost Text. Maybe one of them is blocked in your environment.
I do not know the reason. It occured several days ago. But I did not see that again. BTW, the port means the Internet Port? Can it be blocked by firewall? Thank you!
@zhixing2017 Looking at the elisp here
https://github.com/alpha22jp/atomic-chrome/blob/master/atomic-chrome.el
on line 304 the :host
is set to 'local
which, from the
documentation here means that it is only trying to connect to your
localhost
The default websocket port looks to be 64293
(on line 346)
It looks like the code looks up the process for the browser extension (in my case GhostText) then connects a websocket to it. See lines:
- 341
- 339
- 331
I don't understand how it finds the process though. I think the key line for this is on line 331.
Does anyone know what gets passed in as
proc
in the function atomic-chrome-httpd-process-filter
?
(defun atomic-chrome-httpd-process-filter (proc string)
"Process filter of PROC which run each time client make a request.
STRING is the string process received."
(setf string (concat (process-get proc :previous-string) string))
(let* ((request (atomic-chrome-httpd-parse-string string))
(content-length (cadr (assoc "Content-Length" request)))
(uri (cl-cadar request))
(content (cadr (assoc "Content" request))))
(if (and content-length
(< (string-bytes content) (string-to-number content-length)))
(process-put proc :previous-string string)
(atomic-chrome-httpd-send-response proc))))