Closed mphojele closed 4 years ago
Yes, I mostly agree, though it depends on the value of httpd-host. If it's either "nil" or "local" (symbols), it should use "localhost". If it's "0.0.0.0" or "0" it should use system-name like it does now. (Is there a more reliable way than checking against these two strings?) Otherwise it should use the value of httpd-host. Want to make a PR for it?
What happened is that Emacs changed the default bind address for network processes from 0.0.0.0 to localhost. This was a good, safe change. Since simple-httpd's default is to use the default address, impatient-mode by default now binds to localhost.
In my system it gets it wrong. it follows system-name instead of localhost, which is where the server is
I'm sorry a came back here after so long. Data connection is expensive in my country. Anyways, my os is Manjaro, an Arch derivative, and it so happens the /etc/hosts
had a different ip for localhost and the custom system name, which is why when imp-visit-buffer prepended my system-name the files where actually served at localhost
I think this
(format "http://%s:%d/imp/" (system-name) httpd-port)
inimp-visit-buffer
could be changed to(format "http://localhost:%d/imp/" httpd-port)
.