From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Back to emacsclient/server Date: Mon, 23 Oct 2006 15:46:49 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161632864 13144 80.91.229.2 (23 Oct 2006 19:47:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2006 19:47:44 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 23 21:47:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gc5lV-0004qb-AB for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2006 21:47:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gc5lU-0005dp-Vi for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2006 15:47:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gc5lB-0005bc-IC for emacs-devel@gnu.org; Mon, 23 Oct 2006 15:46:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gc5lA-0005aQ-Kq for emacs-devel@gnu.org; Mon, 23 Oct 2006 15:46:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gc5lA-0005aD-DI for emacs-devel@gnu.org; Mon, 23 Oct 2006 15:46:56 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gc5lA-0003CF-CO for emacs-devel@gnu.org; Mon, 23 Oct 2006 15:46:56 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id A9ECD2CF129; Mon, 23 Oct 2006 15:46:55 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id EBE713FE0; Mon, 23 Oct 2006 15:46:49 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id D516C6CABE; Mon, 23 Oct 2006 15:46:49 -0400 (EDT) Original-To: "Juanma Barranquero" In-Reply-To: (Juanma Barranquero's message of "Mon\, 23 Oct 2006 16\:14\:20 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61058 Archived-At: > - 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