From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas Newsgroups: gmane.emacs.devel Subject: Re: Overlay boundaries and undo Date: Sat, 09 Nov 2024 11:15:29 +0530 Message-ID: <86ses1rmdi.fsf@gmx.net> References: <87wmhemzic.fsf@gmail.com> <86h68ip4uq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1895"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 09 06:46:36 2024 Return-path: Envelope-to: ged-emacs-devel@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 1t9eIt-0000Pv-7Q for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Nov 2024 06:46:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9eI5-0002sc-Oh; Sat, 09 Nov 2024 00:45:45 -0500 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 1t9eI3-0002sT-TX for emacs-devel@gnu.org; Sat, 09 Nov 2024 00:45:43 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9eI2-0005Pq-6Y for emacs-devel@gnu.org; Sat, 09 Nov 2024 00:45:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1731131135; x=1731735935; i=jimjoe@gmx.net; bh=eTX7Q64SoM0eT+PsvEIAVPbnOIP+rc6G4VODX05YdUQ=; h=X-UI-Sender-Class:From:To:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=TDZH3tpnK5n0/0LqyeCYbDv21aGeKHncvCtQt4DZTofvXoaFhk0/t5c9tEQIZHLt OzcucFqNW0lCVuK4meHoZoeb6rC9InZD/qg6WKIrZMt+qb3p0DzpitXmvFenq4Fo4 Lb3QIes3oLzVXp4YpYeGVf1sRI1upt/n3Wlf05Z9w733qVnq6fQnnqho8Bs09nLlE tm7Kfi7nBY3akki0H2WWa7EW/T7wOF6pnfrlprx+16E1DeyHE5RM44ZMduN4kqTdp E4bdEFrwzU4K9EDUzH+gtmbn2UKPYYInLW3gj3CJAwbRNA4ekInvL/5Z5dFEYicM9 Dn7eqHQ4gI8bEIaj/A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-3493 ([42.108.29.39]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MDQeU-1sz9tA1UJS-00CxfM for ; Sat, 09 Nov 2024 06:45:35 +0100 In-Reply-To: <86h68ip4uq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 08 Nov 2024 09:22:21 +0200") X-Provags-ID: V03:K1:++WAa/H9a8/ZuIL22Irg6Rqt8ct1uPQy+Png6TxUd0zCtNe8arl nUCRAeWBIgKzNGQWpqxa89AvY9a9inN1Zxyz8SOT5vvhAonwc48f9RXothAn30GwgIPrRUx 4zDU7L3lgMkU5Law+Jha4/htwnvPp4CL8rntymyn4B7P4jHvGJAsW5yh1QSurv8TX/NJ3l1 mhUqO2gwjNd4PuGM1rsHQ== UI-OutboundReport: notjunk:1;M01:P0:w3v36+IcFPg=;/a+XZFz7tpkVgev0toJ4VpaoNsU 24Gu3ISh72aoD1EvTfFDLx87EDG+X/iy1qAZqzgEsDaGqPx+sIUjCKpv54Lfyt5fAghoXcz8t qzbBfsTo92xxBDeiGyE+3Dr8o9pO4Gd5V2A9tNLTjGgVM+XsovlasZ9mgrgmfHyWYpZ53BtF3 rUHk/IgrELNnS4UXlWXtR4mfCsrPDPiuv++C6zJtVrN7CO4mjNFPlkQmpH5ZS2J2qq8ew7o73 xE0TyY+/U/h6B8O7bMcWZuCMcj7C86kJ7nXM+0uREP1BDxOJXVWELt5796FT4aawFYAMxK9IH hEaMLdHU7YxDzxoz5Kprt76H/UgDmEM4YTPKKxtJ+OsUWp0UNGDVORGZH5XOTheQZijv0b/5H RnlA6WHLQ/726b//2D++TbyN4GpmRkQMRlffbg6hJtRW1v5OXMJmKOpuVxIAsEKDjrGR5mHL4 GmyjLKiW38KFa/YECQMV0GPr7kGRiqD1WZKGqolneyRklKT4yZtx7z6KOt4y1r9V6yrVq8Gwz r+HUsVi1Rqgi903ldy27L+U3oGqyEV02y6WYb6UFiFanVRP4NQVJNUmGWrPKf2zEdpSwq+Yzo xVBpYecY9lGteDhi1H8YZVrQ3P3KriDr/ai73niWvKFJAi39Me4IDrfNCvS1i3Dw2nsfMVeHU MljvsocXTxap0bcaTU4XTeaI23Scew2Ed1kBY6B48j/NqPkns4Sn7ouYOhNl3pgHU+VkfEkHb ixTUtNmbQKAfyKznIWlutgehe/HYRq7f14aDyY1nINNGceXhoKTvYXGS+Js6iBNXNrinbtYk Received-SPF: pass client-ip=212.227.17.21; envelope-from=jimjoe@gmx.net; helo=mout.gmx.net 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325316 Archived-At: Eli Zaretskii wrote: >> I'm trying to understand how overlay boundaries interact with undo. Th= e >> reason is that I'm tracking a region of a buffer with an overlay, and >> would like to be able to restore overlay boundaries when text deleted a= t >> the overlay boundary is reinserted via undo. >> >> - When I delete some text in a range that includes an overlay boundary, >> the overlay boundary is moved. This works as expected. In the >> example below I deleted one character, ".", at the end of an overlay, >> and the overlay boundary moved one character to the left. >> >> - If I then undo, the deleted text is reinserted but the overlay >> boundary is not moved back to its original position. >> ... > > In what version of Emacs do you see this? The implementation of > overlays was fundamentally changed in Emacs 29, and one of the aspects > of that change was that overlays are not based on markers anymore. If that's the case, undoing deletions that straddle overlay boundaries would not restore the overlay, because the boundary position is lost. I just tried it and it seems to be so. =2D-