GNU bug report logs - #21968
25.0.50; Undo boundary change / problem with point after undo

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Sat, 21 Nov 2015 03:07:02 UTC

Severity: normal

Found in version 25.0.50

Done: John Wiegley <jwiegley <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21968 in the body.
You can then email your comments to 21968 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to phillip.lord <at> newcastle.ac.uk, bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Sat, 21 Nov 2015 03:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Reitter <david.reitter <at> gmail.com>:
New bug report received and forwarded. Copy sent to phillip.lord <at> newcastle.ac.uk, bug-gnu-emacs <at> gnu.org. (Sat, 21 Nov 2015 03:07:02 GMT) Full text and rfc822 format available.

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

From: David Reitter <david.reitter <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; Undo boundary change / problem with point after undo
Date: Fri, 20 Nov 2015 22:06:42 -0500
X-Debbugs-CC: phillip.lord <at> newcastle.ac.uk


Emacs -Q

Paste or enter the following text into the scratch buffer:

Hello World. Hello world how are you?

Move cursor to the beginning of a word, such as "world".

Hit M-DEL  (backward-kill-word).  Word is killed as it should be, and point remains on "world".
Then, C-_ (undo).

Now, point is not where it should be (on "world", as before the change), but in the next line.


The problem was introduced in 44dfa86 (Aug 6, 2015).


(This was seen is on the emacs-25 branch.)



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Sat, 21 Nov 2015 16:33:05 GMT) Full text and rfc822 format available.

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

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: David Reitter <david.reitter <at> gmail.com>
Cc: 21968 <at> debbugs.gnu.org
Subject: Re: bug#21968: 25.0.50;
 Undo boundary change / problem with point after undo
Date: Sat, 21 Nov 2015 10:04:32 +0000
Thanks for the report.

I believe I have a fix for this (currently on branch
fix/undo-point-in-wrong-place).

Phil


David Reitter <david.reitter <at> gmail.com> writes:

> X-Debbugs-CC: phillip.lord <at> newcastle.ac.uk
>
>
> Emacs -Q
>
> Paste or enter the following text into the scratch buffer:
>
> Hello World. Hello world how are you?
>
> Move cursor to the beginning of a word, such as "world".
>
> Hit M-DEL  (backward-kill-word).  Word is killed as it should be, and point remains on "world".
> Then, C-_ (undo).
>
> Now, point is not where it should be (on "world", as before the change), but in the next line.
>
>
> The problem was introduced in 44dfa86 (Aug 6, 2015).
>
>
> (This was seen is on the emacs-25 branch.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Sun, 22 Nov 2015 00:56:02 GMT) Full text and rfc822 format available.

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

From: David Reitter <david.reitter <at> gmail.com>
To: Phillip Lord <phillip.lord <at> russet.org.uk>
Cc: 21968 <at> debbugs.gnu.org, emacs-devel <emacs-devel <at> gnu.org>
Subject: Re: Apparent regression on the undo command
Date: Sat, 21 Nov 2015 19:55:22 -0500
Phil,

I tried your fix.  It works for backward-kill-word, but for kill-word (forward), the cursor ends up in the wrong place (after the word, not where it was initially).

- David


> On Nov 21, 2015, at 6:18 AM, Artur Malabarba <bruce.connor.am <at> gmail.com> wrote:
> 
> I can't speak for the code, but I just tested your fix and looks like it works.
> 
> Thanks Phil.
> 
> 2015-11-21 10:02 GMT+00:00 Phillip Lord <phillip.lord <at> russet.org.uk>:
> 
> I have a possible fix for this now, currently on the
> branch fix/undo-point-in-wrong-place. I waiting for some other feedback
> on my code before I squash and merge it, but if you have the chance it
> would be good to know if it works.
> 
> Phil
> 
> 
> Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
> 
> > No problem Phil.
> > Thanks for looking into this.
> > On 20 Nov 2015 7:51 am, "Phillip Lord" <phillip.lord <at> newcastle.ac.uk> wrote:
> >
> >>
> >> It is my commit after all. I will work on it as soon as I can. Had a nasty
> >> cold for the last few days.
> >>
> >> Phil
> >> ________________________________________
> >> From: emacs-devel-bounces+phillip.lord=newcastle.ac.uk <at> gnu.org
> >> [emacs-devel-bounces+phillip.lord=newcastle.ac.uk <at> gnu.org] on behalf of
> >> Karl Fogel [kfogel <at> red-bean.com]
> >> Sent: 20 November 2015 01:24
> >> To: Phillip Lord
> >> Cc: Artur Malabarba; emacs-devel
> >> Subject: Re: Apparent regression on the undo command
> >>
> >> phillip.lord <at> russet.org.uk (Phillip Lord) writes:
> >> >Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
> >> >> 2015-11-19 9:47 GMT+00:00 Phillip Lord <phillip.lord <at> russet.org.uk>:
> >> >>> I'll try and see if I can automate the problem and
> >> >>> run a bisect.
> >> >>
> >> >> The following works for me. When called on the *scratch* buffer it
> >> >> returns non-nil if the problem occurs.
> >> >>
> >> >> (progn
> >> >>   (kmacro-call-macro nil nil nil [134217788 11 14 14 11 67108911])
> >> >>   (equal (point-min) (point)))
> >> >>
> >> >> That macro simply calls M-< C-k C-n C-n C-k C-/
> >> >
> >> >
> >> >I tried various combinations -- works interactively but fails in batch
> >> >either because *scratch* hasn't been initialized, or undo appears to
> >> >work wrongly.
> >> >
> >> >No worries, it's easy enough to test by hand, and am doing so.
> >>
> >> Any luck?  FWIW I'm noticing the bug too, in emacs-25 branch built from
> >> commit c210b8b128c.
> >>
> >> Best regards,
> >> -Karl
> >>
> >>
> 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Mon, 23 Nov 2015 17:28:01 GMT) Full text and rfc822 format available.

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

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: David Reitter <david.reitter <at> gmail.com>
Cc: 21968 <at> debbugs.gnu.org, emacs-devel <emacs-devel <at> gnu.org>
Subject: Re: Apparent regression on the undo command
Date: Mon, 23 Nov 2015 17:27:37 +0000
Okay, am working on this now!

David Reitter <david.reitter <at> gmail.com> writes:

> Phil,
>
> I tried your fix. It works for backward-kill-word, but for kill-word
> (forward), the cursor ends up in the wrong place (after the word, not where it
> was initially).
>
> - David
>
>
>> On Nov 21, 2015, at 6:18 AM, Artur Malabarba <bruce.connor.am <at> gmail.com> wrote:
>> 
>> I can't speak for the code, but I just tested your fix and looks like it works.
>> 
>> Thanks Phil.
>> 
>> 2015-11-21 10:02 GMT+00:00 Phillip Lord <phillip.lord <at> russet.org.uk>:
>> 
>> I have a possible fix for this now, currently on the
>> branch fix/undo-point-in-wrong-place. I waiting for some other feedback
>> on my code before I squash and merge it, but if you have the chance it
>> would be good to know if it works.
>> 
>> Phil
>> 
>> 
>> Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
>> 
>> > No problem Phil.
>> > Thanks for looking into this.
>> > On 20 Nov 2015 7:51 am, "Phillip Lord" <phillip.lord <at> newcastle.ac.uk> wrote:
>> >
>> >>
>> >> It is my commit after all. I will work on it as soon as I can. Had a nasty
>> >> cold for the last few days.
>> >>
>> >> Phil
>> >> ________________________________________
>> >> From: emacs-devel-bounces+phillip.lord=newcastle.ac.uk <at> gnu.org
>> >> [emacs-devel-bounces+phillip.lord=newcastle.ac.uk <at> gnu.org] on behalf of
>> >> Karl Fogel [kfogel <at> red-bean.com]
>> >> Sent: 20 November 2015 01:24
>> >> To: Phillip Lord
>> >> Cc: Artur Malabarba; emacs-devel
>> >> Subject: Re: Apparent regression on the undo command
>> >>
>> >> phillip.lord <at> russet.org.uk (Phillip Lord) writes:
>> >> >Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
>> >> >> 2015-11-19 9:47 GMT+00:00 Phillip Lord <phillip.lord <at> russet.org.uk>:
>> >> >>> I'll try and see if I can automate the problem and
>> >> >>> run a bisect.
>> >> >>
>> >> >> The following works for me. When called on the *scratch* buffer it
>> >> >> returns non-nil if the problem occurs.
>> >> >>
>> >> >> (progn
>> >> >>   (kmacro-call-macro nil nil nil [134217788 11 14 14 11 67108911])
>> >> >>   (equal (point-min) (point)))
>> >> >>
>> >> >> That macro simply calls M-< C-k C-n C-n C-k C-/
>> >> >
>> >> >
>> >> >I tried various combinations -- works interactively but fails in batch
>> >> >either because *scratch* hasn't been initialized, or undo appears to
>> >> >work wrongly.
>> >> >
>> >> >No worries, it's easy enough to test by hand, and am doing so.
>> >>
>> >> Any luck?  FWIW I'm noticing the bug too, in emacs-25 branch built from
>> >> commit c210b8b128c.
>> >>
>> >> Best regards,
>> >> -Karl
>> >>
>> >>
>> 




Added indication that bug 21968 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 23 Nov 2015 18:30:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Mon, 14 Dec 2015 20:06:02 GMT) Full text and rfc822 format available.

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

From: John Wiegley <jwiegley <at> gmail.com>
To: phillip.lord <at> russet.org.uk (Phillip Lord)
Cc: David Reitter <david.reitter <at> gmail.com>, 21968 <at> debbugs.gnu.org
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Mon, 14 Dec 2015 12:04:59 -0800
>>>>> Phillip Lord <phillip.lord <at> russet.org.uk> writes:

> Okay, am working on this now!

Hi Phil,

I just built emacs-25, but most actions that I take give me errors like the
following:

    Symbol’s function definition is void: undo-auto-amalgamate

Have I omitted to do something?

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Mon, 14 Dec 2015 20:09:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: John Wiegley <jwiegley <at> gmail.com>
Cc: david.reitter <at> gmail.com, 21968 <at> debbugs.gnu.org, phillip.lord <at> russet.org.uk
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Mon, 14 Dec 2015 22:09:02 +0200
> From: John Wiegley <jwiegley <at> gmail.com>
> Date: Mon, 14 Dec 2015 12:04:59 -0800
> Cc: David Reitter <david.reitter <at> gmail.com>, 21968 <at> debbugs.gnu.org
> 
> I just built emacs-25, but most actions that I take give me errors like the
> following:
> 
>     Symbol’s function definition is void: undo-auto-amalgamate
> 
> Have I omitted to do something?

I don't know, but that function is in simple.el.  Did you build in a
clean directory?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Mon, 14 Dec 2015 21:29:02 GMT) Full text and rfc822 format available.

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

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: John Wiegley <jwiegley <at> gmail.com>, 21968 <at> debbugs.gnu.org,
 david.reitter <at> gmail.com
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Mon, 14 Dec 2015 21:28:55 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: John Wiegley <jwiegley <at> gmail.com>
>> Date: Mon, 14 Dec 2015 12:04:59 -0800
>> Cc: David Reitter <david.reitter <at> gmail.com>, 21968 <at> debbugs.gnu.org
>> 
>> I just built emacs-25, but most actions that I take give me errors like the
>> following:
>> 
>>     Symbol’s function definition is void: undo-auto-amalgamate
>> 
>> Have I omitted to do something?
>
> I don't know, but that function is in simple.el.  Did you build in a
> clean directory?

I'd suspect a clean build here, also. I introduced undo-auto-amalgamate
in eaa1fd6d.

Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Mon, 14 Dec 2015 22:18:01 GMT) Full text and rfc822 format available.

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

From: John Wiegley <jwiegley <at> gmail.com>
To: phillip.lord <at> russet.org.uk (Phillip Lord)
Cc: John Wiegley <jwiegley <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
 21968 <at> debbugs.gnu.org, david.reitter <at> gmail.com
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Mon, 14 Dec 2015 14:05:19 -0800
>>>>> Phillip Lord <phillip.lord <at> russet.org.uk> writes:

>> I don't know, but that function is in simple.el.  Did you build in a
>> clean directory?

> I'd suspect a clean build here, also. I introduced undo-auto-amalgamate in
> eaa1fd6d.

Hmm.. I'm building with Nix, which should by definition mean always having a
clean environment. I'll look into it further.

Thanks,
-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Mon, 14 Dec 2015 22:31:02 GMT) Full text and rfc822 format available.

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

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: John Wiegley <jwiegley <at> gmail.com>
Cc: david.reitter <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 21968 <at> debbugs.gnu.org
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Mon, 14 Dec 2015 22:30:28 +0000
John Wiegley <jwiegley <at> gmail.com> writes:

>>>>>> Phillip Lord <phillip.lord <at> russet.org.uk> writes:
>
>>> I don't know, but that function is in simple.el.  Did you build in a
>>> clean directory?
>
>> I'd suspect a clean build here, also. I introduced undo-auto-amalgamate in
>> eaa1fd6d.
>
> Hmm.. I'm building with Nix, which should by definition mean always having a
> clean environment. I'll look into it further.

My guess would be that the src directory has build, but simple.elc was
not. Never used nix, am afraid.

Phil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Mon, 14 Dec 2015 22:35:01 GMT) Full text and rfc822 format available.

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

From: John Wiegley <jwiegley <at> gmail.com>
To: phillip.lord <at> russet.org.uk (Phillip Lord)
Cc: david.reitter <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 21968 <at> debbugs.gnu.org
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Mon, 14 Dec 2015 14:34:24 -0800
>>>>> Phillip Lord <phillip.lord <at> russet.org.uk> writes:

> My guess would be that the src directory has build, but simple.elc was not.
> Never used nix, am afraid.

I can confirm after installation that the source file had the function defined
in it, but the compiled version did not. I've changed the Nix build expression
to explicitly remove all .elc files, to force a clean rebuild each time. It's
going much more slowly now, which is heartening.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21968; Package emacs. (Tue, 15 Dec 2015 09:32:01 GMT) Full text and rfc822 format available.

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

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: John Wiegley <jwiegley <at> gmail.com>
Cc: david.reitter <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 21968 <at> debbugs.gnu.org
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Tue, 15 Dec 2015 09:31:54 +0000
John Wiegley <jwiegley <at> gmail.com> writes:

>>>>>> Phillip Lord <phillip.lord <at> russet.org.uk> writes:
>
>> My guess would be that the src directory has build, but simple.elc was not.
>> Never used nix, am afraid.
>
> I can confirm after installation that the source file had the function defined
> in it, but the compiled version did not. I've changed the Nix build expression
> to explicitly remove all .elc files, to force a clean rebuild each time. It's
> going much more slowly now, which is heartening.

Well there is a turn up -- someone who is happy that the build is
getting slower!

I think that this issue is probably complete now. Anyone know how to
close it?

Phil




Reply sent to John Wiegley <jwiegley <at> gmail.com>:
You have taken responsibility. (Tue, 15 Dec 2015 15:07:01 GMT) Full text and rfc822 format available.

Notification sent to David Reitter <david.reitter <at> gmail.com>:
bug acknowledged by developer. (Tue, 15 Dec 2015 15:07:02 GMT) Full text and rfc822 format available.

Message #42 received at 21968-done <at> debbugs.gnu.org (full text, mbox):

From: John Wiegley <jwiegley <at> gmail.com>
To: phillip.lord <at> russet.org.uk (Phillip Lord)
Cc: david.reitter <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 21968-done <at> debbugs.gnu.org
Subject: Re: bug#21968: Apparent regression on the undo command
Date: Tue, 15 Dec 2015 07:06:02 -0800
>>>>> Phillip Lord <phillip.lord <at> russet.org.uk> writes:

> I think that this issue is probably complete now. Anyone know how to close
> it?

Closed (by appending "-done" to the bug id in the e-mail addr).

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Jan 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 163 days ago.

Previous Next


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