bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#47439: 27.2; In daemon mode, if after-init-hook errors out, the serv


From: Lars Ingebrigtsen
Subject: bug#47439: 27.2; In daemon mode, if after-init-hook errors out, the server does not start
Date: Sun, 28 Mar 2021 16:43:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> The problem here is that if the daemon signals an error any place
> during startup before it starts the server, there's no way at all to
> communicate with the daemon, so you cannot know what happened and why.
>
> So I think we should provide one of the following, in case of such
> errors:
>
>  . exit the daemon and leave the description of the problem on some
>    disk file, or display it on the screen
>  . start the server and allow clients to connect and see the error
>    message, with or without the backtrace

Ah, right -- in this error mode, the Emacs starts, but there's no
feedback on the error -- it just hangs, and if you `C-c' it on the
command line, the Emacs is running in the background, but the daemon
hasn't started.

So that's, indeed, a very bad way to handle errors here.

I don't know why the doc string here specifies that there's no error
handling of this hook in particular -- that's the default for hooks,
right?

It seems that it first appeared in 1992:

+  "Functions to call after loading the init file (~/.emacs).
+The call is not protected by a condition-case, so you can set `debug-on-error'
+in .emacs, and put all the actual code on `after-init-hook'.")

Which is even more confusing -- it seems like the point here is that
this is a way to run init code, but get debugging?  We now have a
separate facility for that, so that bit doesn't seem very important any
more.

Anyway -- I think perhaps continuing on here and starting the daemon
might be the most useful solution here, perhaps?

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





reply via email to

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