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:52: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="22509"; 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:53:16 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 1tEDEp-0005j0-Js for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Nov 2024 20:53:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEDEe-0007hu-6b; Thu, 21 Nov 2024 14:53: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 1tEDEc-0007hE-G5 for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 14:53: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 1tEDEc-0008FS-7d for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 14:53: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=fYdL7hAJ8fZSXUJUNLEZwMQ1BWEI7hxxDpYNOcZrjFQ=; b=afovRRsKBF/OFPICRkL/UDpCtV8opBlraxw8mj1Vd/B5WCccZHYKIGfnEdvCi/7mNAVJ5pWCKeeo2lTvhLHDY+BbuyKJvNJ5ELT3odS29Bnm+lTjbBqZWe4e/aFGZXX5znQzru5nYzeYs74WSSUeHKprExi1z8vIwurPaMwn2hN18ie2qH6oP4ysZ2j6U5APGoIzOXE+HigReYUq3/mjtfeRLa66ZJtD2Dfbtm0po4GYAnZwtfzQ3XqIPBKxJP4lAwAKSsaiJVqQrzQskzQuj82Edh2lBXooNz+Pl+bXzwedvCKJjbM5pCiYn7Sn2G0iyhN/+enMaHfytT3LOqlmXw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEDEc-0003rx-2W for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 14:53:02 -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:53:02 +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.173221876514845 (code B ref 70724); Thu, 21 Nov 2024 19:53:02 +0000 Original-Received: (at 70724) by debbugs.gnu.org; 21 Nov 2024 19:52:45 +0000 Original-Received: from localhost ([127.0.0.1]:51825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEDEK-0003rM-Oq for submit@debbugs.gnu.org; Thu, 21 Nov 2024 14:52:45 -0500 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:50341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEDEI-0003r9-QZ for 70724@debbugs.gnu.org; Thu, 21 Nov 2024 14:52:43 -0500 In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 21 Nov 2024 19:49:13 +0000") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1732218757; bh=fYdL7hAJ8fZSXUJUNLEZwMQ1BWEI7hxxDpYNOcZrjFQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=fqWUBWEE3E2zLZyKgM/A2DBAY2w7A3aEtsq8iwHAxciaabFSksT9LYsZyfb2zkAj0 KVMM4fFYEoENOaZK6SQK3HtAteyRo3EnqK/P896eh8PAS0AMwclUt8TRl/OxadDFNH haIeadD91g755dgfQBTVOR3n7Ve92DU/F40b6HDJZEANaMaSbXHLdd4ZePySNyPXp9 eOQ7qYJsMrvbUtJt/PGnbYCgsGjBzbDVDCliHbvL+0+eg1bbuZgUWuEAa2ZywBC+Ac 2EOXkUGI6wKrUaIkPkRITQYSI6OBl/ZRTlUSUb5SDnIX01SXSxaC8fj3/AS4ijCaSI S2peUCrd6KF0Q== 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:295750 Archived-At: 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 because > + (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.