GNU bug report logs - #21523
25.0.50; Undo with active region adds extra text

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 20 Sep 2015 07:42:01 UTC

Severity: minor

Tags: confirmed

Found in version 25.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 21523 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: bug#21523: 25.0.50; Undo with active region adds extra text
Date: Mon, 16 Aug 2021 19:30:37 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: drew.adams <at> oracle.com,  21523 <at> debbugs.gnu.org
> Date: Mon, 16 Aug 2021 15:53:55 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> This bug is still present in Emacs 28.
> >
> > Why is it a bug?  What is the expected "non-buggy" behavior in this
> > case?
> 
> I'd expect it to either do nothing (since we're undoing in a region, and
> the changed text is outside the region), or change the "This" to
> "this".  Leaving "Thisthis" in the buffer has to be a bug no matter how
> you look at it.

Is signaling an error okay?  Because then it looks like an off-by-one
error somewhere -- the following slightly modified recipe works as
expected:

  emacs -Q
  C-u 23 M-g c ; go to "text"
  M-c
  C-f          ; the crucial difference!
  C-SPC
  C-e
  C-/
    => user-error: No further undo information for region

So the problem seems to be that in the original recipe the region
starts immediately after the end of the modified portion of text.




This bug report was last modified 2 years and 338 days ago.

Previous Next


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