From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#70077: An easier way to track buffer changes Date: Sat, 30 Mar 2024 13:19:31 +0000 Message-ID: <87frw77t7g.fsf@localhost> References: <87sf082gku.fsf@localhost> <86v853dguu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24550"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 70077@debbugs.gnu.org, yantar92@gmail.com, qhong@alum.mit.edu, frederic.bour@lakaban.net, joaotavora@gmail.com, mail@nicolasgoaziou.fr, acm@muc.de, phillip.lord@russet.org.uk, stephen_leake@stephe-leake.org, alan.zimm@gmail.com, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 30 14:20:24 2024 Return-path: Envelope-to: geb-bug-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 1rqYdD-0006AV-7D for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Mar 2024 14:20:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqYcr-0003k4-ER; Sat, 30 Mar 2024 09:20:01 -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 1rqYcq-0003jw-Rf for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 09:20:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqYcq-0007oC-GZ for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 09:20:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqYcr-0007iF-Ut for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 09:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 13:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70077-submit@debbugs.gnu.org id=B70077.171180477629571 (code B ref 70077); Sat, 30 Mar 2024 13:20:01 +0000 Original-Received: (at 70077) by debbugs.gnu.org; 30 Mar 2024 13:19:36 +0000 Original-Received: from localhost ([127.0.0.1]:44197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqYcS-0007gt-0Z for submit@debbugs.gnu.org; Sat, 30 Mar 2024 09:19:36 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:40497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqYcO-0007g3-JX for 70077@debbugs.gnu.org; Sat, 30 Mar 2024 09:19:34 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BECD4240109 for <70077@debbugs.gnu.org>; Sat, 30 Mar 2024 14:19:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711804764; bh=18D/xibYEnioWpFFPVKAGiYFyDdZCmS+JhopXNpS6VE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=dq7/JOhghVP5rfmVktZAiGB44wlFGtpMI93elaCyS/Ik5ZA7Uuw8J1jvjtBm8yPSs khz+aVeX+4PnYs3jAs9W7I7j11jx8RpYUrRUhMEUFwvF3FqyQwCsNfYu6m74D1x+Ia iWkbrIt37w3Aaq3slsrX4K0lKZvaHZuo48qKI2I9tJJyuubG0XkR+gsvXVgn5Q5Z43 4gfHqTdwJ/oKRHV9zROh7TCvlLmu482AK/m+830OWC1ngAn1uz/ENJLcAkVGGkE45a Kqw5DhQZvJTHOk+Jy4M+TEROrgITZP+Yq6fE65eFjDrPnqxtyF7UBeg49P75Xte84t QsK5/LTQ5TK+w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V6HtL0Ysbz6trs; Sat, 30 Mar 2024 14:19:21 +0100 (CET) In-Reply-To: <86v853dguu.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282362 Archived-At: Eli Zaretskii writes: > In any case, who and where said the changes will be fetched by > track-changes-fetch must be in the order they were made? why is the > order at all significant? I have concerns that the following API promise can be fulfilled: (defun track-changes-fetch (id func) "Fetch the pending changes. ID is the tracker ID returned by a previous `track-changes-register'. FUNC is a function. It is called with 3 arguments (BEGIN END BEFORE) where BEGIN..END delimit the region that was changed since the last time `track-changes-fetch' was called and BEFORE is a string containing ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the previous content of that region. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Looking at the implementation of `track-changes--before/after', I can see that it is updating the BEFORE string and these updates implicitly assume that the changes arrive in order - which is not true in some edge cases described in the bug report. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at