From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70724: 29.2.50; eglot-reconnect errors when the project is deleted Date: Thu, 21 Nov 2024 14:55:37 -0500 Message-ID: References: <8634qffrly.fsf@gnu.org> Reply-To: Spencer Baugh Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34709"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov , Eli Zaretskii , app-emacs-dev@janestreet.com, 70724@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 21 20:56:11 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 1tEDHf-0008qJ-Ad for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Nov 2024 20:56:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEDHX-0000KG-VX; Thu, 21 Nov 2024 14:56:04 -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 1tEDHW-0000Jt-GC for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 14:56:02 -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 1tEDHW-0000GT-1L for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 14:56:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=At5kl5+F0zRxTsDzBYg8bGP27yCHYV9WOLKGNOMTYS0=; b=jUSKj7HWGL5vQW2MxjJOzChWGr/lxSfDNDSW3xkJj9+XXCxTSl7naVBk/FHN4oMwj+S95EeW4gzOJFXn2/skne8Vf31KQR+N/6n5s96yLwRhxOX6/+umRJ35+n0rK0WRpnvDJCzUX9wGB246H3Tb5EEtjN+lK6gojf4TTh4M6H71ShMXXfXa+3BORjieTjCgkw9LLJWrhbZM1fCK3QuOpKo70XqFKnQxAgofQP/cq14fDHbuTXI7P8anbW18+pWoolraMUdTFzG05xEQVJO0M2JR5+aQ68GdJB7gFyYoDWYKTRBD6/BwLzjDHMEv/tlWwXS9dT8VIC1woO+7Om1LLQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEDHV-00042N-SV for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 14:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Nov 2024 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70724 X-GNU-PR-Package: emacs Original-Received: via spool by 70724-submit@debbugs.gnu.org id=B70724.173221894515497 (code B ref 70724); Thu, 21 Nov 2024 19:56:01 +0000 Original-Received: (at 70724) by debbugs.gnu.org; 21 Nov 2024 19:55:45 +0000 Original-Received: from localhost ([127.0.0.1]:51833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEDHF-00041t-9Q for submit@debbugs.gnu.org; Thu, 21 Nov 2024 14:55:45 -0500 Original-Received: from mxout6.mail.janestreet.com ([64.215.233.21]:37307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEDHD-00041d-1T for 70724@debbugs.gnu.org; Thu, 21 Nov 2024 14:55:44 -0500 In-Reply-To: (Spencer Baugh's message of "Thu, 21 Nov 2024 14:52:37 -0500") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1732218937; bh=At5kl5+F0zRxTsDzBYg8bGP27yCHYV9WOLKGNOMTYS0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=2k5SDbIZ5ZE6xeBGODRvu/NvrLrW2OGIWobWnQSX8H3zZTRJ9Kuh/zY8pY33zp3Z8 OC6n19gdhczrbDuMoXDORG63jHDJ0SxVX9Y/CjdZY3UUSTrDUtRS2EMSCwk6vuVWct /pAH6GwcRAj2zwTC9/VMdIRpFhhu8q5zDgwRzQGz6DqAEE3YY5ebxtXVUPUw3Xu8bl e4B6ukyQZmiyHYY+TTLd9FjDFgC3ZpRqeFQIF2w5wHzLeGQ+JxkD32xXt1u2h7QXN0 EWYV/LznHRg2VjKYQm++mkUxMZqs25h0hQpHz0IJ+WZVgzlqvihLbgFzK3laf8SJ8f eR+eZFMDmL+JQ== 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:295751 Archived-At: Spencer Baugh writes: > Jo=C3=A3o T=C3=A1vora writes: >> Anyway, this patch is slightly simpler (same idea) >> >> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el >> index e5c27de81fc..1e9a8a36343 100644 >> --- a/lisp/progmodes/eglot.el >> +++ b/lisp/progmodes/eglot.el >> @@ -1518,13 +1518,11 @@ eglot--connect >> "Connect to MANAGED-MODES, LANGUAGE-IDS, PROJECT, CLASS and CONTACT. >> This docstring appeases checkdoc, that's all." >> (let* ((default-directory (project-root project)) >> - (nickname (project-name project)) >> - (readable-name >> - (progn >> - (unless (file-exists-p default-directory) >> - ;; could happen because of bug#70724 or just because >> - (eglot--error "Project '%s' is gone!" nickname)) >> - (format "EGLOT (%s/%s)" nickname managed-modes))) >> + (nickname (if (file-exists-p default-directory) >> + (project-name project) >> + ;; could happen because of bug#70724 or just becau= se >> + (eglot--error "Project at `%s' is gone!" >> default-directory))) >> + (readable-name (format "EGLOT (%s/%s)" nickname managed-modes)) >> server-info >> (contact (if (functionp contact) (funcall contact) contact)) >> (initargs > > That looks good to me. Actually, wait, sorry, neither this nor your initial revised patch fixes this bug at all. The process sentinel still errors because eglot-reconnect errors. We need to actually not try to reconnect when the project is gone.