From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Paul Schmidt Subject: Re: [PATCH] emacs: Use socket instead of port. Date: Sat, 12 Dec 2015 10:00:17 +0100 Message-ID: <566BE221.2020704@gmx.net> References: <87y4d08304.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7g2S-0007BG-Qf for guix-devel@gnu.org; Sat, 12 Dec 2015 04:00:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7g2O-00063i-QI for guix-devel@gnu.org; Sat, 12 Dec 2015 04:00:24 -0500 Received: from mout.gmx.net ([212.227.15.18]:53820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7g2O-00063U-HP for guix-devel@gnu.org; Sat, 12 Dec 2015 04:00:20 -0500 In-Reply-To: <87y4d08304.fsf@gmail.com> 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: Alex Kost , guix-devel@gnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 12.12.2015 09:50, Alex Kost wrote: > Currently, if you try to run a repl command (for example, "M-x > guix-installed-packages") in a second Emacs instance, you'll get > an unfriendly error. That's because `guix-default-port' is busy > already (by another Guix REPL), so you either have to change it > manually or use (setq guix-use-guile-server nil). So with the > attached patch, a socket file with a generated name will be used > instead of a port, which allows you to run as many Emacs instances > with Guix REPLs as you want. > > Many thanks to Florian for the great idea! > > There is one small thing though: Guile does not remove socket file > after exiting from "guile --listen=/tmp/foo" so these dead sockets > will stay in /tmp dir. As there is no `comint-exit-hook' or alike, > I don't see how a socket file can be removed after the REPL is > killed. > Hi, maybe wrap it into an mktemp call? Sorry, I have to run for a meeting now, but isn't there some semantics to mktemp, that the file "disappears" directly, but the fd is kept open? Maybe a little bash wrapper or maybe some elisp magic do the job? Regards, Flo - -- https://fps.io -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWa+IgAAoJEA5f4Coltk8ZWuIH/jU3DabsQHouzdODJwoeqfOi SiASV3GjBUYo37LnmSe9CmwL6q+IfylEZFB79Jfy88IcjIW/LedPC92KNsJOGcKZ t/i6A58SU604BhSaBChWU2Fg1G3SK/J5/FSA7U/netc60g1YKw7OOZx46iHp+Mt0 snoCCpN1v7mfD93HyOMK9VS60IXHEuSfoh6voksVgIeinX1Poql5X8eaTj1JRMT9 XlT1ddIvlWlC/RjRMNTGesd+KCHQTsW+xfnldnh6B2w+egjUpVfZc3jSIDrRZmeh kQDrnr6ZSlK8AO7NF6ZIcxDgxAea1+ckdWwmHCsm2ElHm4CELfrq2VEUG+/iDEg= =DhIx -----END PGP SIGNATURE-----