all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: "Eli Zaretskii" <eliz@gnu.org>,
	app-emacs-dev@janestreet.com,
	"João Távora" <joaotavora@gmail.com>,
	70724@debbugs.gnu.org
Subject: bug#70724: 29.2.50; eglot-reconnect errors when the project is deleted
Date: Thu, 21 Nov 2024 14:46:18 -0500	[thread overview]
Message-ID: <iermshstlo5.fsf@janestreet.com> (raw)
In-Reply-To: <faee5968-77e9-4e0c-a64b-74e2d3bf9f95@gutov.dev> (Dmitry Gutov's message of "Sun, 19 May 2024 18:08:15 +0300")


(Sending again after unarchiving the bug...)

Unfortunately the revised patch pushed by Joao is still broken for me,
because fetching project-name isn't guaranteed to work if the project
doesn't exist.

How about this instead?

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 092a9c6b9a5..502cb7bbb24 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1518,13 +1518,13 @@ 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
+         (nickname
           (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)))
+              (eglot--error "Project '%s' is gone!" default-directory))
+            (project-name project)))
+         (readable-name (format "EGLOT (%s/%s)" nickname managed-modes))
          server-info
          (contact (if (functionp contact) (funcall contact) contact))
          (initargs





  reply	other threads:[~2024-11-21 19:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 19:37 bug#70724: 29.2.50; eglot-reconnect errors when the project is deleted Spencer Baugh
2024-05-04  1:09 ` Dmitry Gutov
2024-05-18  8:31   ` Eli Zaretskii
2024-05-19 15:08     ` Dmitry Gutov
2024-11-21 19:46       ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
     [not found]       ` <ierplmotmxh.fsf@janestreet.com>
2024-11-21 19:49         ` João Távora
2024-11-21 19:52           ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-21 19:55             ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-21 20:14               ` João Távora
2024-11-21 20:51                 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-21 23:36                   ` João Távora
2024-06-06 20:36   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iermshstlo5.fsf@janestreet.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70724@debbugs.gnu.org \
    --cc=app-emacs-dev@janestreet.com \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.