GNU bug report logs - #74276
30.0.90; undo does not account for overlays now that markers are not used

Previous Next

Package: emacs;

Reported by: James Thomas <jimjoe <at> gmx.net>

Date: Sat, 9 Nov 2024 06:43:02 UTC

Severity: normal

Found in version 30.0.90

Full log


Message #8 received at 74276 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: James Thomas <jimjoe <at> gmx.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: karthikchikmagalur <at> gmail.com, 74276 <at> debbugs.gnu.org
Subject: Re: bug#74276: 30.0.90;
 undo does not account for overlays now that markers are not used
Date: Sat, 09 Nov 2024 10:12:53 +0200
> Cc: karthikchikmagalur <at> gmail.com
> Date: Sat, 09 Nov 2024 12:11:50 +0530
> From:  James Thomas via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> - emacs -Q
> - Type: abcdef
> - C-a
> - M-: (overlay-put (make-overlay (point) (+ (point) 3)) 'face 'highlight)
> - Mark the text 'bcd' and delete it
> - M-x undo (does not restore overlay correctly)
> 
> (The solution seems to me to be for undo to also store the overlay,
> adjustment, and whether left, right or both boundaries are involved, and
> use it)

This didn't work with the old implementation of overlays, either.  I
just tested in Emacs 25 and I see the same results there.

Stefan, does undo restore overlays, and if so, how?  I don't see
anything pertinent in the Undo section of the ELisp manual except the
reference to markers (which overlays don't have anymore).  Did that
ever work, and if so, how?  And how should it work now?




This bug report was last modified 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.