GNU bug report logs - #23632
25.1.50; Gratuitous undo boundary in latex-insert-block

Previous Next

Package: emacs;

Reported by: Chong Yidong <cyd <at> gnu.org>

Date: Fri, 27 May 2016 15:12:02 UTC

Severity: minor

Tags: patch

Found in version 25.1.50

Fixed in version 25.1

Done: phillip.lord <at> russet.org.uk (Phillip Lord)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: Chong Yidong <cyd <at> gnu.org>
Cc: 23632 <at> debbugs.gnu.org
Subject: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block
Date: Sun, 29 May 2016 22:51:36 +0100
Chong Yidong <cyd <at> gnu.org> writes:

>> The attached patch, which gets rid of the undo boundary, seems to fix
>> this:
>
> Actually, the previous patch does not DTRT: if you switch back to the
> original buffer from the minibuffer, and make further editing changes,
> those changes would get lost because buffer-undo-list is temporarily
> rebound.
>
> Here is a different patch, which works by removing the undo boundary in
> buffer-undo-list if there's one.  It also tweaks HTML mode and Texinfo
> mode, which have similar issues.  It defines a new function
> `undo-amalgamate', split off from `undo-auto-amalgamate', for
> convenience.


In and off itself, the patch seems fine, but my concern is that that the
previous heuristic did the right thing, the new heuristic does not. If
you've found three instances where it's causing a problem, then there
will be others also.

I'm not 100% sure why the old system didn't insert an undo-boundary.
But, if we could solve this entirely in the undo system without changes
to client code that would be nicer.

Not sure how yet -- need a few days to think about it. Perhaps,
suppressing the auto-boundary functionality when only the mini-buffer
has changed.

Phil




This bug report was last modified 8 years and 350 days ago.

Previous Next


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