From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#70724: 29.2.50; eglot-reconnect errors when the project is deleted Date: Thu, 21 Nov 2024 20:14:24 +0000 Message-ID: References: <8634qffrly.fsf@gnu.org> 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="32857"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , Eli Zaretskii , app-emacs-dev@janestreet.com, 70724@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 21 21:16:56 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 1tEDbk-0008KZ-AP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Nov 2024 21:16:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEDbH-000571-PR; Thu, 21 Nov 2024 15:16:31 -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 1tEDat-00050b-4p for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 15:16:03 -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 1tEDas-0004Vy-S3 for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 15:16:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=8bvVMEPKs1jRkjH9tE1L0madIBIiWahrAKmZZ4cx+rA=; b=BnYba0v9UxFJaTWR4boweCIywDvhS2+YEZu6XxBHJAtN6rWQNjaUiiFb05gUstDnz5qIqQEIvOL3imnSwpLoeqY1HBpuoWBouvYeLvXzDLDL339TBPxuVCutVIqhDgy82gww5W9B6aQsVOMxZwabpfVA/E7u0lWCrDkktpPhn620FLsPDagKD16zuvzgxutzzpglpiw/kBOqvyvDCDlfnHP1TvX278IOEyiaONq6MroxTZppfA2J/iwyBjMNxHJWLs7+mPoiBzxnskAOVUXX8Y2XkOO9wVPiPVEZHkP+RIeDCxuwsqNXrYSu46vwJKLX/LLdQq0dc2OAcV5e5brfGw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEDar-0004w9-PI for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 15:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Nov 2024 20:16: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.173222014318947 (code B ref 70724); Thu, 21 Nov 2024 20:16:01 +0000 Original-Received: (at 70724) by debbugs.gnu.org; 21 Nov 2024 20:15:43 +0000 Original-Received: from localhost ([127.0.0.1]:51860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEDaY-0004vX-PC for submit@debbugs.gnu.org; Thu, 21 Nov 2024 15:15:43 -0500 Original-Received: from mail-oi1-f176.google.com ([209.85.167.176]:43239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEDaW-0004vH-HS for 70724@debbugs.gnu.org; Thu, 21 Nov 2024 15:15:41 -0500 Original-Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3e7b704b7e1so1206003b6e.0 for <70724@debbugs.gnu.org>; Thu, 21 Nov 2024 12:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732220075; x=1732824875; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8bvVMEPKs1jRkjH9tE1L0madIBIiWahrAKmZZ4cx+rA=; b=HXYtYYRR06+j/1+hEj7XFOymji6EwOzCKpkpCQwX2JSZUzznwNhIXT/F55uqgUSHrd 17O21raM2HBPwzJFWOh63xyDPEQNa1UGgRnBGmEsQpCS8vObnN1LttXp4XIgPEOQfOY/ eksv7hMw9ULhbvQq8LMhntvBB0KpR3RVmQM2aBK8mwEotuVb5Mnj4TGYbK6W74t7TZ8z wijx/q/rwgvt4EHIn5e56023b1ZY0pjr970VFG8zd6tXGvr2wZxyKM3N0eGtY0CImhrC bXiuA/P66iwE4980gfSBpQQVWC0YGVUHZva0kfQigowO80P3mrfMEiXBESvxS9JopHjO LE+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732220075; x=1732824875; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8bvVMEPKs1jRkjH9tE1L0madIBIiWahrAKmZZ4cx+rA=; b=DkESj/yGk70IsOPPv7XdxCJ/ZuPlcfygwpiQBdl4lF5txUYja4YD1QrstmC/YJZGrx jg+EeP/LeMKJvgTJFSJh3/76z9+LgsIHzaIq1SuXH+6h4DJ4k4DEXgE+mlIG22P9giR3 TFbtbxD3cRKhj2kyrICvAwRPnOO3XrxTaocJ46iys83xFuFhsFxXCn5m90IkziGTJWne r/bCsdYSPVU/FZ9FniNNjzy5D1C9yIlqHVflgtV13SCmB9063XTDA8XMXlDm1St0O9tr lNlhz0tIuDF3fPjSUj838be4SbYeZO4yaHHa0GLs3K6d6si/incEXsSnJZoh+rCWg71C OLvA== X-Forwarded-Encrypted: i=1; AJvYcCWVpvrBDuYJHqwu8Oj+7ounxU5NGLWPexSR5OlmW3Tch8s1dC0DCG6oecsDSc0CnT3njueP7w==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxMysawJlWca0jc+N5p8EcPFeDaNFptI1iR/aVqIJg0P2hOLaLv VLa686xKJnKnYwuchr3xAW+COIiB/Zx3AOkwBGNRK4OMwLXs25eAmKsb+PzgK6SOtl2qQ9HpJPy AXQ8r87FmgtDyI+jt1Df8amsGn6Q= X-Gm-Gg: ASbGncueUElVnzBwjugcEoVqlMt6nrtrWe8Fp37cjC2c4AT4Cc+Q+Y6SySLwhmD69w9 TBzZd3k+znu5h5eC+jfqkVzadmomuEA== X-Google-Smtp-Source: AGHT+IE+tMPlB3dtgoBHQha04yjvh1s657ehNWvzblgiCDCmVEpIhCqGNN4W43997uXcyv/wK8Ovr0FRwspftTNfdsI= X-Received: by 2002:a05:6808:1789:b0:3e7:ac6a:2137 with SMTP id 5614622812f47-3e914a7f5c0mr297321b6e.16.1732220075033; Thu, 21 Nov 2024 12:14:35 -0800 (PST) In-Reply-To: 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:295753 Archived-At: Explain your scenario, please. And note that if you take the rug from underneath Eglot it will error, period. That's by design. I'm not willing to contort the code to do anything more than provide a more or less understandable error message for such (relatively rare) rug pulling. IOW sentinels erroring is part of Emacs life and not a bug in itself, it's the error message that I'm willing to help ensure is clear. Please provide a backtrace and say if it's obtained with the very same recipe in the beginning of the bug report. Jo=C3=A3o On Thu, Nov 21, 2024 at 7:55=E2=80=AFPM Spencer Baugh wrote: > > 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 bec= ause > >> + (eglot--error "Project at `%s' is gone!" > >> default-directory))) > >> + (readable-name (format "EGLOT (%s/%s)" nickname managed-mode= s)) > >> 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. --=20 Jo=C3=A3o T=C3=A1vora