From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails Date: Tue, 13 Feb 2024 21:46:02 +0200 Message-ID: <86jzn8p2px.fsf@gnu.org> References: <865xysr17s.fsf@gnu.org> <86mss4p83n.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34458"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68799@debbugs.gnu.org, monnier@iro.umontreal.ca, jasonr@gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 13 20:47:03 2024 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 1rZykA-0008fb-8H for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Feb 2024 20:47:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZyk0-0003am-C8; Tue, 13 Feb 2024 14:46:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZyju-0003Uz-R0 for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 14:46:50 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZyjs-0007Li-RH for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 14:46:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZykA-0004hw-1m for bug-gnu-emacs@gnu.org; Tue, 13 Feb 2024 14:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Feb 2024 19:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68799 X-GNU-PR-Package: emacs Original-Received: via spool by 68799-submit@debbugs.gnu.org id=B68799.170785359518049 (code B ref 68799); Tue, 13 Feb 2024 19:47:02 +0000 Original-Received: (at 68799) by debbugs.gnu.org; 13 Feb 2024 19:46:35 +0000 Original-Received: from localhost ([127.0.0.1]:47485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZyji-0004h3-GB for submit@debbugs.gnu.org; Tue, 13 Feb 2024 14:46:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZyjd-0004gm-KI for 68799@debbugs.gnu.org; Tue, 13 Feb 2024 14:46:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZyjF-0007EH-RY; Tue, 13 Feb 2024 14:46:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dKMbeXuDmmdZTIXI2eswQlJdPugBNNWVKY+RrAtRSAI=; b=LnpIe+cwigLD sArfusN9pdDBcO7v/Lzk9v5nO9361SFyL35kVnw8V/t+nNEi6jbNoDyP/hntJsyN9vEb7E0jfJr1p tbOlnU+FLUxHIPgY2XVpOqELz1SgcRxj+5PEcSzrSbD2R/7tUyCba376kvnAyOe9OhOOccGbGbjMr 45l920D9+/Vn1iBA0QPr3CkPBVPtsEnXt3Jp66isDnLulD0UtNMOEyhG2XDRVF77OY9yP/0tyK0Hd a/U2ImU4316I4zImE4qKywkVO9gpBWg4rfzCbQlYxNTVeHcGOy4+/9hTonGxWNEiL33iS5/PEKeIM MGpcOHmq6BCyVMNzy/YZhA==; In-Reply-To: (message from Spencer Baugh on Tue, 13 Feb 2024 13:04:24 -0500) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279974 Archived-At: > From: Spencer Baugh > Cc: 68799@debbugs.gnu.org, monnier@iro.umontreal.ca, jasonr@gnu.org > Date: Tue, 13 Feb 2024 13:04:24 -0500 > > Eli Zaretskii writes: > > > Using DAEMON_RUNNING would mean any errors while starting the server > > will fail to show the explicit error message about that. That's a > > regression in my book. So I hope we can find a better solution. > > Could you be more specific about what would regress in this situation? > Preferably with a step by step of something that behaves worse. I mean this error message: (let ((dn (daemonp))) (when dn (when (stringp dn) (setq server-name dn)) (server-start) (if server-process (daemon-initialized) (if (stringp dn) (message "Unable to start daemon: Emacs server named %S already running" server-name) (message "Unable to start the daemon.\nAnother instance of Emacs is running the server, either as daemon or interactively.\nYou can use emacsclient to connect to that Emacs process.")) (kill-emacs 1)))) > Currently the error message doesn't get shown at all, so I'm not clear > what could be regressing. We already established why the message doesn't show: because errors in server-start are not caught. I thought we also agreed that catching the errors there and letting startup.el show the above error messages is something that should be done. I think your patch will prevent us from doing that because the code which you suggest to patch with DAEMON_RUNNING will kill Emacs before startup.el gets the chance to show the error message, because daemon-initialized has not yet been run by that time.