Subject: bug#33847: 27.0.50; emacsclient does not find server socket

From: Ulrich Mueller <[email-masked]>
Date: Sun, 23 Dec 2018 17:20:10 +0100

The specification of XDG_RUNTIME_DIR at
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
says this:

| $XDG_RUNTIME_DIR defines the base directory relative to which
| user-specific non-essential runtime files and other file objects
| (such as sockets, named pipes, ...) should be stored. [...]

| The lifetime of the directory MUST be bound to the user being logged
| in. It MUST be created when the user first logs in and if the user
| fully logs out the directory MUST be removed. [...]
| Files in the directory MUST not survive reboot or a full
| logout/login cycle.

It explicitly says that the directory does not persist between login
sessions, whereas - at least in my understanding - an Emacs running as
a daemon is supposed to survive logout, so that the user can reconnect
to it later. (For example, I use that feature for persistent ERC
sessions.)

So, I would conclude that XDG_RUNTIME_DIR is not an appropriate
location for the socket of a daemon process.