GNU bug report logs -
#70541
track-changes-mode logs warnings (with input method, in Eglot buffer)
Previous Next
Reported by: Richard Copley <rcopley <at> gmail.com>
Date: Tue, 23 Apr 2024 20:46:03 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: 70541 <at> debbugs.gnu.org,
> João Távora <joaotavora <at> gmail.com>
> Date: Tue, 23 Apr 2024 23:14:16 -0400
> From: Stefan Monnier via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> The problem is that Quail inserts an underlined `^` in the buffer to
> show you the part of the input that's already been typed and it does so
> stealthily (i.e. within `with-silent-modifications`), which implies that
> the `before/after-change-functions` have not been called, and as
> a consequence the size of the buffer is not the one that track-changes
> expects (and the content of the buffer doesn't corresponds to what Eglot
> will send to the LSP server based on the changes it has witnessed,
> which can cause errors since Eglot has to send buffer positions and
> those may not mean the same any more for the LSP server).
>
> I suggest the patch below (the second hunk is unrelated, I just bumped
> into it while tracking this bug).
Are you sure we want buffer-change hooks to be called here? Quail
intentionally hides some of the modifications it does, because it many
times replaces the inserted text with something else, and from the
Emacs Lisp program's POV only the final input is the actual
"insertion" Emacs should know about.
So I'm not sure we should install this, as it could break something
elsewhere. Aren't there any alternatives to this? More generally,
why should Eglot care about these low-level details of Quail?
This bug report was last modified 1 year and 71 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.