Subject: Re: bug#73041: 30.0.90; track-changes-mode logs warnings (#70541 regression? not actually fixed?)

From: Stefan Monnier <[email-masked]>
Date: Thu, 30 Jan 2025 13:33:05 -0500

>>> I haven't figured out a way to reproduce it yet, but I've set
>>> track-changes-record-errors to 'trace to try and get more information
>>> the next time that it occurs.

Hmm... looks like you're using the `emacs-30` code, where
`track-changes-record-errors` doesn't yet support `trace`.  🙁

> I encountered the issue again while doing a query-replace in a buffer
> narrowed to a single function, after moving to the beginning of the
> buffer.
>
> Here is the relevant part of my messages buffer:
>
>   Beginning of buffer
>   track-changes--after: Assertion failed: (or track-changes--before-no (<= track-changes--before-beg (track-changes--state-beg track-changes--state) beg end (track-changes--state-end track-changes--state) track-changes--before-end))
>   Mark set
>   track-changes-fetch: Assertion failed: (not (memq id track-changes--clean-trackers))
>   Undo
>   Saving file /home/mwillcock/path/to/file/UserChooser.php...
>   Use C-x 4 s to update shadows.
>   Wrote /home/mwillcock/path/to/file/UserChooser.php
>   track-changes-fetch: Assertion failed: (not (memq id track-changes--clean-trackers))
>
> The undo was because I had tried to answer "y" to the next replacement,
> but I imagine that the track-changes error had exited the query-replace
> process because the "y" was inserted into the buffer.

Thanks for the details, it's very helpful.

These seem to point not just to errors in other parts of Emacs, but in
errors in `track-changes.el` itself.  I'll have to look more closely to
try and figure out where it might come from.

Just to rule some obvious candidate, could you clarify exactly which
version of Emacs you were running?  Is it built from the Emacs-30.0.93
tarball or from a particular commit in Git, or does it come from elsewhere?

        Stefan