all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#70929: 30.0.50; eglot--apply-text-edits prevents point adjustment
@ 2024-05-14  2:15 Troy Brown
  2024-05-14  5:30 ` Felician Nemeth
  2024-05-14  6:23 ` Eli Zaretskii
  0 siblings, 2 replies; 10+ messages in thread
From: Troy Brown @ 2024-05-14  2:15 UTC (permalink / raw)
  To: 70929

Language Servers may use onTypeFormatting to provide indentation for a
buffer.  When this happens, the language server will indicate a
newline trigger character (in the DocumentOnTypeFormattingOptions).
In the Emacs buffer, after hitting RET, point is moved to the next
line and a textDocument/onTypeFormatting request is sent from Eglot to
the server.  The server responds back with the corresponding spacing
prefix for the line in newText of the TextEdit response.  However,
when Eglot applies the text edit to insert this spacing, via
eglot--apply-text-edits, it uses save-excursion, and this prevents the
point from being pushed to the end of the inserted spacing.  It would
seem that save-excursion should be avoided when applying text edits.
This issue has been observed with the Ada Language Server.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-05-21  3:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14  2:15 bug#70929: 30.0.50; eglot--apply-text-edits prevents point adjustment Troy Brown
2024-05-14  5:30 ` Felician Nemeth
2024-05-14 12:38   ` Troy Brown
2024-05-14  6:23 ` Eli Zaretskii
2024-05-14  9:28   ` João Távora
2024-05-14 12:43     ` Troy Brown
2024-05-14 14:16       ` João Távora
2024-05-15 12:58         ` Troy Brown
2024-05-15 15:10           ` João Távora
2024-05-21  3:35         ` Troy Brown

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.