GNU bug report logs -
#77658
30.1.50; Eglot: wrong-type-argument: consp, #<marker at 1 in file> when saving
Previous Next
Full log
View this message in rfc822 format
On Sat, Apr 26, 2025 at 12:08 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> Ping! João, any suggestions or comments?
I think Aaron is on the right track by identifying this as a mismatch
between before-change-functions and after-change-functions. This seems
to happen in a (rather extreme?) edge case where the full buffer's
contents are replaced just before saving.
It looks like a bug in the b-c-fns and a-c-fns, and there are a number
of those that eglot.el already recognizes and fixes. Stefan Monnier has
written a library to try to smooth over these bugs and provide a better
API to clients, but that some problems in itself so I recently removed
it. I don't know if it had support for fixing this particular bug. I
could re-add it, but I think the root problem should be clearly identified
before. The ideal fix, in my view, is for the b-c-fns and a-c-fns to be
fixed so that they are more predictable.
In the meantime, I wonder if completely disabling the modification hooks
around the `insert-file-contents` wouldn't be a suitable workaround.
There would, of course, be no change notification Eglot -> LSPserver,
except for Eglot stating it has saved the file to disk, which most LSPs
usually interpret as a hint to go read from the disk.
João
This bug report was last modified 49 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.