Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 794649 - app-emacs/emacs-daemon fails to set the socket location emacsclient 27 expects by default
Summary: app-emacs/emacs-daemon fails to set the socket location emacsclient 27 expect...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2021-06-07 02:15 UTC by Judge Dredd
Modified: 2022-08-25 08:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Judge Dredd 2021-06-07 02:15:35 UTC
emacs-daemon fails to set the socket location emacsclient 27 expects by default

Reproducible: Always

Steps to Reproduce:
1. switch to emacs 27
2. start emacs-daemon (tested for non-root user)
3. try to run emacsclient
Actual Results:  
error connecting to socket

Expected Results:  
normal start

The problem seems to be in the startup process. Now, as of version 27, emacs
expects XDG_RUNTIME_DIR to be set to use that location for the socket file
(https://github.com/emacs-mirror/emacs/blob/emacs-27/etc/NEWS#L328)
but it's not set correctly when using start-stop-daemon --user for a regular user.
Comment 1 Ulrich Müller gentoo-dev 2021-06-07 22:28:57 UTC
See upstream bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33847

As a workaround, define the EMACS_SOCKET_NAME environment variable (it should typically have a value "/tmp/emacs${UID}/server").
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-25 07:51:24 UTC
Apparently fixed upstream as of 28.1 (I can't read debbugs properly...)
Comment 3 Ulrich Müller gentoo-dev 2022-08-25 08:53:12 UTC
(In reply to Sam James from comment #2)
> Apparently fixed upstream as of 28.1 (I can't read debbugs properly...)

Not fixed, but I agreed in https://debbugs.gnu.org/51327 (messages #69 and #78 there) that the Emacs 27 behaviour is still better than what was suggested in that bug.