all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Gillespie <epg@pretzelnet.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 73041@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#73041: 30.0.90; track-changes-mode logs warnings (#70541 regression? not actually fixed?)
Date: Thu, 10 Oct 2024 11:21:21 -0500	[thread overview]
Message-ID: <87cyk80vzy.fsf@hassadar.pretzelnet.org> (raw)
In-Reply-To: <jwvbk01uhgu.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 03 Oct 2024 15:21:24 -0400")

Hi Stefan!

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> If you're able to try Emacs `master` (which would be helpful), then the
> patch I sent doesn't apply to it (any more), so please use the patch
> below instead and add `(setq track-changes-record-errors 'trace)` to your
> init file so as to activate the additional recording.

I applied that patch to master and have been using it every day.
This morning I FINALLY hit it...  on a NEW FILE, where I'm
switching in and out of a branch with a new file.  I'm not sure
all the previous occurrences were on new files, but I could
believe they were.

Anyway, with that clue in hand, I was able to narrow it down to a
simple reproduction recipe.

I'm running emacs built from this commit to master:

commit ef587bf6b46b2ea3ef91b260ac2542666081260d
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Thu Oct 3 13:32:09 2024

With your cl-assert patch applied on top of that.

GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, cairo version 1.18.2) of 2024-10-04

(We won't use git in the recipe, but eglot requires project-root
which I can't get to work without git (which also seems like a
bug, albeit unrelated...))

 1. cargo new --vcs git foo
 2. echo 'mod foo;' >> foo/src/main.rs
 3. emacs -Q foo/src/foo.rs
    (foo.rs DOES NOT EXIST YET -- that is part of the bug)
 4. M-x rust-ts-mode RET
 5. (progn (setq track-changes-record-errors 'trace) (setq debug-on-error t))
 6. C-x C-f main.rs RET
 7. M-x eglot RET
 8. echo 'struct foo;' > foo/src/foo.rs
 9. C-x C-f foo.rs RET
10. yes RET

BOOM TODAY

Note that #8 must be an edit behind emacs's back.  In my daily
life, what's happening there is I had the buffer 'foo.rs' open
earlier while working on the branch where I added it, I'd
switched to a branch without it, and then I switch back, and
everything fell apart when I reverted it.

Debugger entered--Lisp error: (cl-assertion-failed ((track-changes--sane-state-p) nil))
  cl--assertion-failed((track-changes--sane-state-p))
  track-changes--before(1 13)
  track-changes--after(1 13 0)
  insert-file-contents("/home/epg/tmp/emacsbug73041/foo/src/foo.rs" t nil nil if-regular)
  revert-buffer-insert-file-contents--default-function("/home/epg/tmp/emacsbug73041/foo/src/foo.rs" nil)
  revert-buffer--default(t t)
  revert-buffer(t t)
  find-file-noselect("~/tmp/emacsbug73041/foo/src/foo.rs" nil nil t)
  find-file("~/tmp/emacsbug73041/foo/src/foo.rs" t)
  funcall-interactively(find-file "~/tmp/emacsbug73041/foo/src/foo.rs" t)
  call-interactively(find-file nil nil)
  command-execute(find-file)

I hope this is enough to go on now.

Thanks!

-- 
Eric Gillespie <*> epg@pretzelnet.org





  reply	other threads:[~2024-10-10 16:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 13:28 bug#73041: 30.0.90; track-changes-mode logs warnings (#70541 regression? not actually fixed?) epg
2024-09-05 13:54 ` Eli Zaretskii
2024-09-08 23:06   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-21  9:11     ` Eli Zaretskii
2024-09-25  1:36       ` Eric Gillespie
2024-09-27 14:55         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-03 19:21           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-10 16:21             ` Eric Gillespie [this message]
2024-10-17 15:45               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cyk80vzy.fsf@hassadar.pretzelnet.org \
    --to=epg@pretzelnet.org \
    --cc=73041@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.