From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs 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 Message-ID: <87sg4fqqxn.fsf@gnus.org> References: <87czvjs7pq.fsf@gnus.org> <83zgynml0n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12712"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: gilles.usenet@gmail.com, 47439@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 28 16:44:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQWeF-0003B0-Hf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 16:44:15 +0200 Original-Received: from localhost ([::1]:33000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQWeE-0000qR-5A for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 10:44:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQWe3-0000px-MG for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 10:44:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQWe2-0007vL-Oo for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 10:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQWe2-0004dO-Jc for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 10:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Mar 2021 14:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47439 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 47439-submit@debbugs.gnu.org id=B47439.161694264117800 (code B ref 47439); Sun, 28 Mar 2021 14:44:02 +0000 Original-Received: (at 47439) by debbugs.gnu.org; 28 Mar 2021 14:44:01 +0000 Original-Received: from localhost ([127.0.0.1]:46729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWe1-0004d2-57 for submit@debbugs.gnu.org; Sun, 28 Mar 2021 10:44:01 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:56508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWdz-0004cp-Iw for 47439@debbugs.gnu.org; Sun, 28 Mar 2021 10:44:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TnWqgkfsdA16nahPo01LWiXp68RN1E+fSerR1FFbReE=; b=TTWnDfylHgLJ/u6+5OwV/vSVEw B3pbgBPttpy/IpVrcBVcyjYH889TVv7BLCZXYxkeiSD/a9g+K2KOVcORFJmntiqgmjSInFyVN88VY 9z/ajVW2/SfMejdMZ32LKaIxRixFeK5esO9LfjSl/ikVX+Jddh3nLrqz2c72Qutiuhec=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQWdq-0003Pw-8u; Sun, 28 Mar 2021 16:43:52 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEX29PKpoJ5ANjyE eXv////bjemzAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UDHA4QLku4gPIAAAGiSURBVDjLnZQJbsQg DEVZLoDhAsG+AMv979ZvA0mmlSq1HmWkzMMxvNjj3D8il9nLZJY55+AVBqZ+eZaeSsqjE1FZoOBK ClwGSHZzgK8LVAPtAZEV+LEA+7tGMBC5Zk6OOJ0MzwbyAuWAiQQBwI7rwKOY6YAhF5Jwhj4YW+K4 QA9cFbBmMA2RDch3qs6ADOQJ7wOSa647kyEqhsYLuAWwvk8qG2RdOrc9FiGaD1gxbWufdnFqct7l byAmAwGgQ9Z9QNgFSC40AOfbIzGyAtgNAE5u4PMCvMDjKrIB2A3cUaG/7GrxwZfWGA/ALwCFOQ1w Pq7wguQK6km1w6Pk7arAbjRTss6XX9oJS/FZiscBzXnSR03LmEcJbtCct0krdsCPWABaKfO1X4Fo ax8QuoHitK8Q+4DJxWogpgDwths4KMiXAqy/7Q4Dql0znhaNLAoiG/joXauBKzBh++llVwHsAljr LwC7yGiZh4LMp3dn6QWSWi65BWus/T4mVQUJPdSiNeUBpRLmHEDnVYd9fkjsxSZ8Cv4Nxu928xmN NQcP+GN8AWUfXI8JbkajAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTAzLTI4VDE0OjE2OjQ2KzAw OjAwaXGUtAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wMy0yOFQxNDoxNjo0NiswMDowMBgsLAgA AAAASUVORK5CYII= X-Now-Playing: The Style Council's _The Complete Adventures (2)_: "Homebreakers" In-Reply-To: <83zgynml0n.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 28 Mar 2021 17:05:12 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203171 Archived-At: Eli Zaretskii 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