From: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: Dmitry Gutov <dmitry@gutov.dev>, Eli Zaretskii <eliz@gnu.org>,
app-emacs-dev@janestreet.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:55:37 -0500 [thread overview]
Message-ID: <ierh680tl8m.fsf@janestreet.com> (raw)
In-Reply-To: <ierjzcwtldm.fsf@janestreet.com> (Spencer Baugh's message of "Thu, 21 Nov 2024 14:52:37 -0500")
Spencer Baugh <sbaugh@janestreet.com> writes:
> João Távora <joaotavora@gmail.com> 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.
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.
next prev parent reply other threads:[~2024-11-21 19:55 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
[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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ierh680tl8m.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).