emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about XDG_RUNTIME_DIR and server-socket-dir


From: Phil Sainty
Subject: Re: Questions about XDG_RUNTIME_DIR and server-socket-dir
Date: Mon, 04 Feb 2019 10:12:50 +1300
User-agent: Orcon Webmail

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]