emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclient horribly broken


From: Tim Van Holder
Subject: Re: emacsclient horribly broken
Date: Thu, 2 Nov 2006 16:29:05 +0100

On 11/2/06, Juanma Barranquero <address@hidden> wrote:
On 11/2/06, Tim Van Holder <address@hidden> wrote:

> 1) emacs -f server-start with server-use-tcp set to off throws an error
>    (cannot bind to socket: address already in use). If server-use-tcp is
>    enabled, the error disappears - so "old-style" local socket use is
>    currently broken.

Could you please investigate this? I cannot test Unix sockets.

Well, the error traceback is

(file-error "Cannot bind server socket" "address already in use")
 make-network-process(:name "server" :server t :noquery t :sentinel
server-sentinel :filter server-process-filter :coding raw-text :family
local :service "/tmp/emacs1000/server" :plist (:authenticated t))
 apply(make-network-process :name "server" :server t :noquery t
:sentinel server-sentinel :filter server-process-filter :coding
raw-text (:family local :service "/tmp/emacs1000/server" :plist
(:authenticated t)))
 server-start(nil)

Note that I couldn't debug properly because running edebug-defun on server-start
throws an error too: (invalid-read-syntax "Expected lambda expression"),
leaving point at line 329 of server.el (point indicated by ^):
   (letf (^((default-file-modes) ?\700))

I removed /tmp/emacs1000 after closing emacs, and now the problem is
gone - I only get the "address in use" error if I start a second emacs (which is
understandable I guess, but that never happened before today). I can't
explain why it's different now though, as the newly-created /tmp/emacs1000
has the same permissions and ownership as the old one, as far as I can tell.

> 2) emacsclient fails to find the TCP-based server by default;
[...]
> Because linux has file system sockets, the default server_file
> (server) is never tried.

That is by design. People asked for emacsclient to default to local
sockets (if available), and not to use TCP sockets unless explicitly
requested. If you want it to always use TCP, you can set the
environment variable EMACS_SERVER_FILE, so server_file will always be
defined.

I just expected emacsclient to use whatever emacs used without extra
arguments. If I choose to enable server-use-tcp in emacs, I would expect
emacsclient to find emacs without an extra option.  I can't think of any
realistic situation where ~/emacs.d/server/server exists (due to emacs
being active as server over TCP) and I'd still want emacsclient to try local
sockets instead.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]