On Fri, Nov 22, 2024 at 4:39 AM Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> wrote:
But be aware that you're never really safe if you're relying on the mark
ring here. If json-diff is an interactive command, nothing is stopping
the user from pushing another mark to the ring in between of specifying
file-a and file-b.

Yes.  The command is intended to be used after setting a mark at the start of a JSON sexp and moving to the start of a JSON sexp somewhere else, and doing nothing else in between.
 
Also, I don't know where did you get the last-global-mark thing, it's
not something that's in the Emacs 29 or 30's core.

Indeed not.  It's from the workaround I described in this thread just yesterday.

Welp, I'm done.  I've invested more effort into this bug report than I ever thought would be necessary.  It's the second time in a row that I've reported a bug to a free software project and had it devolve into me having to defend my use case.  Fix the code or the docs, or don't.  I'll just use my workaround.