Skip to content

init.el: Prevent unnecessarily calling server-start in some cases #17015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

bcc32
Copy link
Collaborator

@bcc32 bcc32 commented Jun 2, 2025

Namely, don't call (server-start), even when
dotspacemacs-enable-server is non-nil, in the following cases:

  1. emacs --batch -u "" (normally --batch disables reading the user's
    init file such as Spacemacs, but it is a reasonable use-case to
    run a batch Spacemacs)
  2. emacs --daemon

Normally it is harmless to run (server-start) explicitly when Emacs
is started as a daemon, but on some versions of Emacs this can
interfere with error handling at startup, and in any case it is
redundant and should be left to the normal Emacs command-line
handling.

catern and others added 2 commits June 2, 2025 13:57
For example, if Spacemacs is invoked in batch mode.
Let the normal startup sequence take care of it instead.  Otherwise,
in certain Emacs versions, an error during after-init-hook can cause
the daemon to hang indefinitely without reporting the error properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants