From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Steven Allen <steven@stebalien.com>
Cc: 70927@debbugs.gnu.org
Subject: bug#70927: Acknowledgement (30.0.50; track-changes assertion when shutting down eglot)
Date: Wed, 15 May 2024 14:49:59 -0400 [thread overview]
Message-ID: <jwvo796ewvx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87y18dwdri.fsf@stebalien.com> (Steven Allen's message of "Mon, 13 May 2024 15:25:21 -0700")
> A quick fix would be to change `eglot--signal-textDocument/didChange`:
>
> - from: `(eglot--track-changes-fetch eglot--track-changes)`
> - to: `(when eglot--track-changes (eglot--track-changes-fetch eglot--track-changes))`
>
> But I'm guessing there's some underlying problem and this may be masking
> the real issue.
Indeed. I pushed the patch below to `master` instead which should also
fix the problem. Please confirm that it fixes it for you as well.
Maybe `eglot-shutdown` shouldn't end up calling
`eglot--signal-textDocument/didChange` at all, but that's a long
standing behavior AFAICT, so I'll leave it for some other time.
Stefan
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 57a019e126d..0ba69f66f0d 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -2022,9 +2022,6 @@ eglot--managed-mode
(eldoc-mode 1))
(cl-pushnew (current-buffer) (eglot--managed-buffers (eglot-current-server))))
(t
- (when eglot--track-changes
- (track-changes-unregister eglot--track-changes)
- (setq eglot--track-changes nil))
(remove-hook 'kill-buffer-hook #'eglot--managed-mode-off t)
(remove-hook 'kill-buffer-hook #'eglot--signal-textDocument/didClose t)
(remove-hook 'before-revert-hook #'eglot--signal-textDocument/didClose t)
@@ -2053,7 +2050,10 @@ eglot--managed-mode
(delq (current-buffer) (eglot--managed-buffers server)))
(when (and eglot-autoshutdown
(null (eglot--managed-buffers server)))
- (eglot-shutdown server)))))))
+ (eglot-shutdown server))))
+ (when eglot--track-changes
+ (track-changes-unregister eglot--track-changes)
+ (setq eglot--track-changes nil)))))
(defun eglot--managed-mode-off ()
"Turn off `eglot--managed-mode' unconditionally."
next prev parent reply other threads:[~2024-05-15 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 22:21 bug#70927: 30.0.50; track-changes assertion when shutting down eglot Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.70927.B.17156389167471.ack@debbugs.gnu.org>
2024-05-13 22:25 ` bug#70927: Acknowledgement (30.0.50; track-changes assertion when shutting down eglot) Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 18:49 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-15 20:51 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 22:09 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 6:14 ` bug#70927: 30.0.50; track-changes assertion when shutting down eglot Eli Zaretskii
2024-05-14 9:14 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 9:34 ` João Távora
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=jwvo796ewvx.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=70927@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=steven@stebalien.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.