all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 73548@debbugs.gnu.org
Subject: bug#73548: 31.0.50; track-changes--error-log
Date: Thu, 03 Oct 2024 11:15:10 -0400	[thread overview]
Message-ID: <jwv1q0xteiv.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2ed52syob.fsf@pro2.fritz.box> ("Gerd Möllmann"'s message of "Sun, 29 Sep 2024 09:32:04 +0200")

Hi Gerd,

> This is a warning I got today while editing a C file. No idea how to
> reproduce, I'm afraid. This is master on a terminal frame.
>
>    ■  Warning (emacs): Missing/incorrect calls to ‘before/after-change-functions’!!
>   Details logged to ‘track-changes--error-log’
>
> track-changes--error-log is a variable defined in ‘track-changes.el’.
>
> Its value is shown below.
>
> List of errors encountered.
> Each element is a triplet (BUFFER-NAME BACKTRACE RECENT-KEYS).
>
> Value:
> (("frame.h" #1=(unexpected-after 47748 47748 1)
>   ((t track-changes--recover-from-error (#1#) nil)
>    (t track-changes--after (47748 47748 1) nil)
>    (t delete-char (-1 nil) nil) (t delete-backward-char (1 nil) nil)
>    (t backward-delete-char-untabify (1) nil)
>    (t c-electric-backspace (nil) nil)
>    (t funcall-interactively (c-electric-backspace nil) nil)
>    (t call-interactively (c-electric-backspace nil nil) nil)
>    (t command-execute (c-electric-backspace) nil))
>   [86 (nil . self-insert-command) 73 (nil . self-insert-command) 83
>       (nil . self-insert-command) 73 (nil . self-insert-command) 66
>       (nil . self-insert-command) 76 (nil . self-insert-command) 69
>       (nil . self-insert-command) 32 (nil . self-insert-command) 40
>       (nil . c-electric-paren) 127 (nil . c-electric-backspace)]))

Hmm... the recent-keys only include "harmless" commands which definitely
should not trigger those "unexpected-after" problems.

The problem that track-changes reports here is that the call to
`after-change-functions` specified a region that's (apparently) outside
the area specified by the previous `before-change-functions`.
Since this is within `delete-char` (according to the backtrace), it's
very weird: `delete-char` is a very basic case where such an error
should have been noticed many years ago.

Do you remember if there might have been other buffer changes during
this `delete-char` e.g. because of some other package hooked (directly
or not) into one of the `*-change-functions`?


        Stefan






  parent reply	other threads:[~2024-10-03 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-29  7:32 bug#73548: 31.0.50; track-changes--error-log Gerd Möllmann
2024-09-29  8:14 ` Eli Zaretskii
2024-10-03 15:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-10-03 15:33   ` Gerd Möllmann
2024-10-03 18:36     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-03 18:46       ` Gerd Möllmann

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=jwv1q0xteiv.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73548@debbugs.gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --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.