emacs-devel
[Top][All Lists]
Advanced

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

Re: Back to emacsclient/server


From: Stefan Monnier
Subject: Re: Back to emacsclient/server
Date: Mon, 23 Oct 2006 15:46:49 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>  - The server (i.e., server.el) should:
>   - Have an option to choose among Unix (if available) or TCP sockets.
>   - Have an option to specify the host address, defaulting to 127.0.0.1.
>   - Choose the port at random (to allow multiple server in the same computer).
>   - Write the hostname address, port and random authentication string
> in a file.
>   - Close any connection which doesn't start with "-auth
> AUTHENTICATION-STRING".

The -auth thingy is not need for unix-sockets.

>  - The client (emasclient.c) should:
>  - Interpret --server-name as an Unix socket (if available), and, if
> that does fail, as a path to the server file.
>  - Default --server-name to an environment variable
> (EMACS_SERVER_NAME, for example), if -server-name is missing.
>  - Send "-auth AUTHENTICATION-STRING" as the first command in any connection.

Sounds OK.  I'm not quite sure how "-server-name" and
"--socket-name" relate.  Maybe we should merge them?

> There was some discussion about allowing/not allowing remote connections
> (defaulting to "not allow"). If they're allowed, either a option in
> server.el would activate remote connection support, or perhaps just the
> fact that server-host != 127.0.0.1 should suffice.  I favor this, because
> connections on Unix sockets will never be remote, so a new option seems
> redundant. But I don't care much.

Agreed.

> Stefan wanted that --server-name=foo, if not valid as a Unix socket,
> would try to open server file ~/.emacs.server/foo to get the address,
> port and authentication string. I'm not so sure. I don't see why root
> in one session cannot try to connect with Emacs in another user's
> session, so --server-name is gonna need to be a (relative or absolute)
> path, and not a name depending of the current user. Am I missing
> something?

I don't understand.  Currently, "--socket-name=FOO" tries /tmp/esrv-UID/FOO
(and if not specified it assumes FOO to be "server"), and that doesn't
prevent root from saying "--socket-name=/tmp/esrv-OTHERUID/bar".
Why shouldn't this work just as well for --server-name?
BTW, it shouldn't be ~/.emacs.server but ~/.emacs.d/servers or something
like that.


        Stefan




reply via email to

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