Subject: Re: bug#47439: 27.2; In daemon mode, if after-init-hook errors out, the server does not start

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 28 Mar 2021 15:56:01 +0200

Gilles <[email-masked]> writes:

> 1. Make an init file with the following line: (add-hook 'after-init-hook 'barf)
> 2. Start Emacs in daemon mode: HOME=$PWD emacs --no-site-file --daemon=foo
>
> Expected behavior: Emacs starts normally (including starting the
> server), with the error logged in *Messages* (and optionally on Emacs's
> stderr), as happens for errors in the init file or in
> emacs-startup-hook.
>
> Actual behavior: the server does not start, so there is no way to
> open a frame other than the initial daemon frame.

The doc string for this variable is pretty explicit about errors:

---
There is no `condition-case' around the running of this hook;
therefore, if `debug-on-error' is non-nil, an error in one of
these functions will invoke the debugger.
---

So I think this is expected behaviour?  Anybody got an opinion?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no