unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Spencer Baugh <sbaugh@janestreet.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 20:14:24 +0000	[thread overview]
Message-ID: <CALDnm51xrr7AmhiUoKX8PsO+KMciJhKqcGjH0fKc23icYmZ1vA@mail.gmail.com> (raw)
In-Reply-To: <ierh680tl8m.fsf@janestreet.com>

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ão

On Thu, Nov 21, 2024 at 7:55 PM Spencer Baugh <sbaugh@janestreet.com> wrote:
>
> 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.



-- 
João Távora





  reply	other threads:[~2024-11-21 20:14 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
2024-11-21 20:14               ` João Távora [this message]
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=CALDnm51xrr7AmhiUoKX8PsO+KMciJhKqcGjH0fKc23icYmZ1vA@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=70724@debbugs.gnu.org \
    --cc=app-emacs-dev@janestreet.com \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --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).