From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.bugs Subject: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Date: Sun, 29 May 2016 22:51:36 +0100 Message-ID: <87wpmcwn13.fsf@russet.org.uk> References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464558753 22275 80.91.229.3 (29 May 2016 21:52:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 May 2016 21:52:33 +0000 (UTC) Cc: 23632@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 29 23:52:19 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b78d4-0002mT-W4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 May 2016 23:52:15 +0200 Original-Received: from localhost ([::1]:57037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b78d4-0004Lp-3c for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 May 2016 17:52:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b78cy-0004LY-2j for bug-gnu-emacs@gnu.org; Sun, 29 May 2016 17:52:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b78cs-0002a0-5X for bug-gnu-emacs@gnu.org; Sun, 29 May 2016 17:52:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b78cr-0002Zw-Uy for bug-gnu-emacs@gnu.org; Sun, 29 May 2016 17:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b78cr-0005Eg-Kf for bug-gnu-emacs@gnu.org; Sun, 29 May 2016 17:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 May 2016 21:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23632 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23632-submit@debbugs.gnu.org id=B23632.146455870520104 (code B ref 23632); Sun, 29 May 2016 21:52:01 +0000 Original-Received: (at 23632) by debbugs.gnu.org; 29 May 2016 21:51:45 +0000 Original-Received: from localhost ([127.0.0.1]:46680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b78ca-0005EB-Pf for submit@debbugs.gnu.org; Sun, 29 May 2016 17:51:44 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:36091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b78cZ-0005Dz-Gd for 23632@debbugs.gnu.org; Sun, 29 May 2016 17:51:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=6+DAlufSt3W7xHsBMCX9vfVB3V6GWOUtD2Zr5UL9zM4=; b=xxEX+zSUfe6Tckraac48N8laVk Qpg5AR4pJuGZ/3+v0P/g8Wn/IPx09aMBK/RdjxW80DBQKl9Vt/Y1jhyupWjBeXtzj0oow0qdH+jqD 5VGxd0Yn+DWJ6jTcad42DSOtklqvdE8chEUgjbdYdlT0iAyrKnf6JLNc/2/nU67z07rl1ICggJNQv 1poWXpI8IzvyT3hAoCcs2ZO4booO/jCGsaNe2EMXXrk9ukBXZZx2tv4QZNfV8SnHYE60cvD8jNWqF QDMdx2c4CfKPoKX6aKfc4We219B0REraq+03h0lVt3jLdyYUPuAyMQGjIa4qGvjEfUQEpYURXyfUp 7W4bUZ4A==; Original-Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:59785 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b78cT-001P7h-Cy; Sun, 29 May 2016 22:51:37 +0100 In-Reply-To: <87shx23830.fsf@gmail.com> (Chong Yidong's message of "Sat, 28 May 2016 16:22:43 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118841 Archived-At: Chong Yidong 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