From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gilles.usenet@gmail.com, 47439@debbugs.gnu.org
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 [thread overview]
Message-ID: <87sg4fqqxn.fsf@gnus.org> (raw)
In-Reply-To: <83zgynml0n.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 28 Mar 2021 17:05:12 +0300")
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
next prev parent reply other threads:[~2021-03-28 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-28 1:00 bug#47439: 27.2; In daemon mode, if after-init-hook errors out, the server does not start Gilles
2021-03-28 13:56 ` Lars Ingebrigtsen
2021-03-28 14:05 ` Eli Zaretskii
2021-03-28 14:43 ` Lars Ingebrigtsen [this message]
2021-03-28 14:55 ` Eli Zaretskii
2021-03-28 14:56 ` Lars Ingebrigtsen
2021-03-28 17:04 ` Gilles
2021-03-28 17:23 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg4fqqxn.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=47439@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=gilles.usenet@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).