all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: "'Help-Gnu-Emacs  (help-gnu-emacs@gnu.org)'" <help-gnu-emacs@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: track-changes and undo
Date: Sun, 21 Apr 2024 10:23:36 +0200	[thread overview]
Message-ID: <864jbvdszb.fsf@p200300d6272f17de4b8317bb694a7515.dip0.t-ipconnect.de> (raw)

Hi Stefan,

I noticed your track-changes package on ELPA the other day. Since I once (a long
time ago) wrote a package[1] that uses `before-change-functions` and
`after-change-functions` and that commits all the sins that you mention in your
package description, I thought I might try and base my package on yours.

I quickly found, though, that using your package, I was not able to distinguish
between "normal" changes and change made by undo. Currently, my code uses
`undo-in-progress` for that, but that doesn't work in the SIGNAL function passed
to `track-changes-register`, because the undo has obviously already finished
when that function is run.

So I'm wondering: is there a way to know if a change is made during undo? If
not, would it make sense to add it as an option?

TIA

Joost


BTW, feel free to answer on the list.




Footnotes:
[1]  https://github.com/joostkremers/criticmarkup-emacs

-- 
Joost Kremers
Life has its moments



             reply	other threads:[~2024-04-21  8:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-21  8:23 Joost Kremers [this message]
2024-04-21 14:54 ` track-changes and undo Stefan Monnier
2024-04-22  7:33   ` Joost Kremers
2024-04-22 12:38     ` Stefan Monnier
2024-04-22 21:41       ` Joost Kremers
2024-04-22 23:04         ` Stefan Monnier
2024-04-23  5:58           ` Eli Zaretskii
2024-04-23  7:06           ` Joost Kremers

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=864jbvdszb.fsf@p200300d6272f17de4b8317bb694a7515.dip0.t-ipconnect.de \
    --to=joostkremers@fastmail.fm \
    --cc=help-gnu-emacs@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.