From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: track-changes and undo Date: Sun, 21 Apr 2024 10:23:36 +0200 Message-ID: <864jbvdszb.fsf@p200300d6272f17de4b8317bb694a7515.dip0.t-ipconnect.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11221"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.2; emacs 29.3 Cc: Stefan Monnier To: "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 21 10:24:21 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rySUm-0002iX-NO for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 21 Apr 2024 10:24:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rySUE-00040u-KN; Sun, 21 Apr 2024 04:23:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rySUC-00040W-JB for help-gnu-emacs@gnu.org; Sun, 21 Apr 2024 04:23:44 -0400 Original-Received: from fout1-smtp.messagingengine.com ([103.168.172.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rySUB-0002kj-1s for help-gnu-emacs@gnu.org; Sun, 21 Apr 2024 04:23:44 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id EC2F31380789; Sun, 21 Apr 2024 04:23:40 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 21 Apr 2024 04:23:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm3; t=1713687820; x=1713774220; bh=6/IoTa48Tmpo3KkjvTVqKsCNxm1pXT/1 Cw52iylYA2w=; b=viBmD4POyUGGVm1g9QsYm44mRuTtV2t1Awc32+QeEedWK0bS ZzfeCGwV79KIIqG7tPbqOPDvmt4tsGW2p2YtOhUiSQI7CcejCB6WHBDBI7G4SFen f7ZU9Ir0SuV1Gk9qDsCULMP/uSnJIregl/afBOc79vVh9JlWLvvm5BBktPU/kZFM n3wg03zWN/rv7uPxOMWDZrurExD32AtvxSjF8CAx9rW6VwUEyiQYSZ/DN2vHJHYz sA0kWH4bEIAcCiAR1Uq7JxUbH8D1DMmNusEMD+5s47o+6VU/E22XUALqswQh88kT rpIK4galAlyRk/W+uKmJshbcanZMaOphjg3LNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1713687820; x=1713774220; bh=6/IoTa48Tmpo3KkjvTVqKsCNxm1pXT/1Cw5 2iylYA2w=; b=cgMhPGVidcfXZ6s/uFjGQYjxva0T1t7V2iEgAS4wRHk+0LooqSW xJPdz4eP4+kxrkmBJlarSfsJ/IvMs4MeFneK+Hi1pGZ6jw0Wx7FV7uEstw0g6yFR gjX5IoeIeNf4G9+Bt2yDTrCj8Krj2o2bHWEqxDjtL2rlbadEMtLFC/7ciKqDB7uy wDSiB3kASlsIMRbV0bkJVr1vd/gGa5u2sIexbAEmBeLQi9UmjshMScZQb0Ri6I2d x/yA4lpesdeFPz2O5M3xbHCTjXaj7nwS8cxh0TfVgmUfnLteH6UgdpP9pRklx3Je D52CcDTrtGmf/E1XABZG1/6cWHgCVaWC3LA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudekjedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgfveffkfggtgesthdtredttdertdenucfhrhhomheplfhoohhsthcu mfhrvghmvghrshcuoehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhlrdhfmheqne cuggftrfgrthhtvghrnhepjefhfefhveeivdegjeelueeiffefgedvuddvtefftefgudeh veeltedtffeukedunecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghr shesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 21 Apr 2024 04:23:39 -0400 (EDT) Received-SPF: pass client-ip=103.168.172.144; envelope-from=joostkremers@fastmail.fm; helo=fout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146413 Archived-At: 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