[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#72696: Track-changes errors out when file is overwritten using Node.
From: |
Eli Zaretskii |
Subject: |
bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS) |
Date: |
Thu, 19 Sep 2024 08:32:21 +0300 |
> Cc: 72696@debbugs.gnu.org
> From: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
> Date: Thu, 19 Sep 2024 00:02:34 +0200
>
> Hi, Stefan,
>
> On Mon, Sep 9, 2024 at 1:06 AM Stefan Monnier <monnier@iro.umontreal.ca>
> wrote:
> >
> > > As far as I can see, the testDocument/didChange request should not be
> > > there.
> >
> > Either the `didClose/didOpen` should not be there, or the `didChange` should
> > not be there. The problem is that we have both.
> >
> > Can you try the patch below, which I suspect should fix your problem?
> > It should get rid of the `didChange` in your recipe.
>
> I gave your patch a try and it indeed fixes the issue. Thank you very
> much for looking into it!
João, is Stefan's patch okay with you? AFAIU, the same problem exists
on the emacs-30 release branch, so I'd like to install the patch
there, if you agree.
Here's the patch in case you didn't see it (I CC'ed you on the
original report, but subsequent discussion omitted you for some
reason, sigh):
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 82e99a2c920..a2c9f73fc73 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -2813,6 +2813,8 @@ eglot--signal-textDocument/didChange
(defun eglot--signal-textDocument/didOpen ()
"Send textDocument/didOpen to server."
+ ;; Flush any potential pending change.
+ (eglot--track-changes-fetch eglot--track-changes)
(setq eglot--recent-changes nil
eglot--versioned-identifier 0
eglot--TextDocumentIdentifier-cache nil)
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), Eli Zaretskii, 2024/09/07
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), Stefan Monnier, 2024/09/08
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), Dario Gjorgjevski, 2024/09/18
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS),
Eli Zaretskii <=
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), Stefan Monnier, 2024/09/19
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), João Távora, 2024/09/19
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), Eli Zaretskii, 2024/09/20
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), Stefan Monnier, 2024/09/20
- bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS), Stefan Monnier, 2024/09/24