From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] emacs: Use socket instead of port. Date: Tue, 15 Dec 2015 21:39:19 +0300 Message-ID: <874mfjtv3c.fsf@gmail.com> References: <87y4d08304.fsf@gmail.com> <87poybzgl5.fsf@gnu.org> <87oadscayu.fsf@gmail.com> <871tao7ynz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8uVR-0007bf-VE for guix-devel@gnu.org; Tue, 15 Dec 2015 13:39:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8uVM-0000SS-RF for guix-devel@gnu.org; Tue, 15 Dec 2015 13:39:25 -0500 In-Reply-To: <871tao7ynz.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 15 Dec 2015 12:13:04 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s (2015-12-15 14:13 +0300) wrote: > Alex Kost skribis: [...] >>> It may be good to fix it upfront though. WDYT? >> >> Sorry, I don't understand. > > I meant that we should probably fix this lingering socket problem before > committing the change. Ah, OK, so I think the current solution is "good enough", so I'm committing it (let's see in practice if there are any downsides). >> Anyway, as I mentioned in the reply to Florian, I think the best would >> be to add a procedure for deleting socket file to `kill-emacs-hook' (as >> in the attached updated patch). This should prevent appearing dead >> sockets. > > Indeed, sounds even better! > >> P.S. Maybe it's a wrong impression, but it looks (to me) that >> connecting to a socket is significantly faster than using a port (so all >> this Guix REPL stuff starts faster). > > Hmm I don=E2=80=99t think it should be noticeably faster. But it=E2=80= =99s definitely > better because socket nodes are not a scarce/global resource (unlike TCP > ports), and they are integrated with the Unix file permission model. Thanks for explaining. >> From d6903c7c115809cf88f892e78785d920ff80184d Mon Sep 17 00:00:00 2001 >> From: Alex Kost >> Date: Sat, 12 Dec 2015 11:23:03 +0300 >> Subject: [PATCH] emacs: Use socket instead of port. >> >> Suggested by Florian Paul Schmidt. >> >> * emacs/guix-backend.el (guix-default-port): Remove. >> (guix-repl-socket-file-name-function, guix-repl-current-socket): New >> variables. >> (guix-repl-socket-file-name, guix-repl-delete-socket-maybe): New >> procedures. >> (guix-get-guile-program): Take socket as an optional argument. >> (guix-start-repl-maybe): Adjust accordingly. > > LGTM, thanks! Pushed, thanks! --=20 Alex