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: w32 does not have emacsclient/server Date: Mon, 08 Aug 2005 19:49:36 -0400 Message-ID: References: <42D75F2C.3040303@student.lu.se> <85zmso79mt.fsf@lola.goethe.zz> <42D7AA3E.7040508@student.lu.se> <42D7C92E.2020100@gnu.org> <42D7CDAA.4070400@student.lu.se> <85zmsorthl.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123545438 3847 80.91.229.2 (8 Aug 2005 23:57:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Aug 2005 23:57:18 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 09 01:57:09 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2HUJ-0001FK-MM for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2005 01:56:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2HWR-0007E9-7s for ged-emacs-devel@m.gmane.org; Mon, 08 Aug 2005 19:59:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E2HVg-00072P-Pt for emacs-devel@gnu.org; Mon, 08 Aug 2005 19:58:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E2HVV-0006uU-82 for emacs-devel@gnu.org; Mon, 08 Aug 2005 19:58:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2HVV-0006rt-3n for emacs-devel@gnu.org; Mon, 08 Aug 2005 19:58:13 -0400 Original-Received: from [195.186.19.66] (helo=mail22.bluewin.ch) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E2Haz-0005T1-V4 for emacs-devel@gnu.org; Mon, 08 Aug 2005 20:03:54 -0400 Original-Received: from empanada.local (213.3.60.97) by mail22.bluewin.ch (Bluewin 7.2.063) id 42E684E0001D0454; Mon, 8 Aug 2005 23:49:36 +0000 Original-Received: by empanada.local (Postfix, from userid 502) id 9C16A5F754F; Mon, 8 Aug 2005 19:49:36 -0400 (EDT) Original-To: Juanma Barranquero In-Reply-To: (Juanma Barranquero's message of "Fri, 5 Aug 2005 03:43:06 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) 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:41734 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41734 > server.el now creates an AF_INET socket, at an unspecified port. The > host address is local (127.0.0.1) unless the user customizes the > variable `server-host' to the IP or name to use to bind the socket. > The server generates a 64-byte random string (not random bytes, but > printable characters in the range `!'..`~'; it's still about 420 bits > of entropy) and writes in `server-file' (by default "~/.emacs.server") > the host, port and authentication string. Connections are expected to > pass as the first thing in a communication exchange the string "-auth > AUTHENTICATION-STRING" where AUTHENTICATION-STRING is the 64-byte > secret key; otherwise the connection is closed immediately. Sounds very good. To the host, port, and auth, I'd add a "server name" entry, which would default to "server", to reproduce the socket-name thingy. > In emacsclient.c I've got rid of all AF_UNIX stuff. Doesn't sound so good. I'd rather make it possible to choose between Unix and TCP sockets (default to Unix when possible, and TCP otherwise). > I've also changed the code to use send/recv instead of writing to a file > handle (was easier than fighting two Windows C compilers' idiosincrasies) > and added buffering so data is only sent on receiving "\n" or filling the > buffer. Fair. > Argument `socket-name' has been replaced by `server-file', to > indicate the path to the server config/auth file (alternatively, the > variable EMACS_SERVER_FILE can be set to point to the file; and BTW, > a better name for the variable would be very welcome). I'd rather see "server-name" which could be a path to a unix socket (like now) or just a relative name of a unix socket (like now) or the name of a server to be found in ~/.emacs.servers. I.e. if there is no unix socket of that name, lookup ~/.emacs.servers for TCP servers. > The last change has been to make it consider \path and c:path as absolute > paths (previously it would prepend the current directory to Windows-style > absolute paths). Of course this should only be done under w32. > environments it'd be posible to use emacsclient/server.el with a fixed > address/port and no .emacs.server file (emacsclient would have to grow > --server-address and --server-port options, of course). What would be the benefit? Stefan