From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: Questions about =?UTF-8?Q?XDG=5FRUNTIME=5FDIR=20and=20server-?= =?UTF-8?Q?socket-dir?= Date: Mon, 04 Feb 2019 10:12:50 +1300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="65165"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Orcon Webmail Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 03 22:13:05 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqP4a-000GrJ-HE for ged-emacs-devel@m.gmane.org; Sun, 03 Feb 2019 22:13:04 +0100 Original-Received: from localhost ([127.0.0.1]:60492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqP4Z-0002CQ-CC for ged-emacs-devel@m.gmane.org; Sun, 03 Feb 2019 16:13:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqP4U-0002CJ-6z for emacs-devel@gnu.org; Sun, 03 Feb 2019 16:12:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqP4T-0002BB-JN for emacs-devel@gnu.org; Sun, 03 Feb 2019 16:12:58 -0500 Original-Received: from smtp-2.orcon.net.nz ([60.234.4.43]:39151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqP4P-00029e-Vb; Sun, 03 Feb 2019 16:12:55 -0500 Original-Received: from [10.253.37.70] (port=42667 helo=webmail.orcon.net.nz) by smtp-2.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1gqP4M-0007oM-SA; Mon, 04 Feb 2019 10:12:51 +1300 Original-Received: from wlgwil-nat-office.catalyst.net.nz ([202.78.240.7]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Mon, 04 Feb 2019 10:12:50 +1300 In-Reply-To: X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 60.234.4.43 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232943 Archived-At: On 2019-02-04 00:21, Eli Zaretskii wrote: > The client already heeds to EMACS_SOCKET_NAME. As for the server, > since Emacs is invoked via a wrapper, I presume the wrapper could set > server-name from the same environment variable, via --eval, no? No, --eval isn't processed until after the init file is processed, so if the user called (server-start) in their init file then the socket is already set. My recollection is that I couldn't find any way of doing something like that. In the past I had used --daemon=NAME with a custom NAME if the user explicitly told the wrapper to run a server; but once it occurred to me that an init file with (server-start) remained a problem I switched to setting TMPDIR. At the time I spent a while trying to figure out what my options were, and that was the only method I could come up with which would work in general. It sounds like a custom XDG_RUNTIME_DIR is the simplest way forward, so I'll use that approach for now. (I do still think a EMACS_SOCKET_DIR environment variable would be a beneficial addition, as the current code doesn't facilitate this.) -Phil