Eglot: abandon track-changes.el
After a ~10 month period of using track-changes.el as a support library
for tracking buffer changes, I've decided to go back to manually using
after-change-functions and before-change-functions.
track-changes.el showed promise:
- One of the selling points was to turn complicated a-c-functions and
b-c-functions into something easier, but that objectively didn't pan
out, with "virtual" positions, one-shot hooks, and tracker
registrations being abstractions and complications mastered by very
few.
- The other selling point was the ability to log and detect those parts
of Emacs that cheat the modification hooks and correct them. As far
as I can tell, only one such cheater -- quail.el -- was identified.
But with little consequence, only an ugly workaround in eglot.el (now
removed).
- After using Eglot daily for all this time, I didn't notice any
decrease in desynchronization events.
- I did notice an increase in track-changes.el related bugs, some of
which still baffle me and and hard to reproduce. A common occurence
is the '(cl-assertion-failed (memq id track-changes--trackers))'
which is hard to track down.
- The library makes it more complicated to run Eglot on older Emacsen.
I might yet revisit this matter for the next version but this
experience has shown that it didn't bring the advantages I thought it
would, so I'm abandoning it until at least 1.19 is out.
* lisp/progmodes/eglot.el (track-changes): No longer require.
(eglot--virtual-pos-to-lsp-position): Delete.
(eglot--managed-mode): Simplify.
(eglot--track-changes): Delete this variable.
(eglot--recent-changes): Reword doc.
(eglot--before-change, eglot--after-change): Bring back.
(eglot--track-changes-fetch): Delete.
(eglot--add-one-shot-hook): Delete.
(eglot--track-changes-signal): Delete.
(cherry picked from commit
ac902ddadcd236dfd1d610768569e26ea8fc5b7f)