From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Date: Sun, 19 Jun 2016 20:59:33 -0400 Message-ID: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466384372 30279 80.91.229.3 (20 Jun 2016 00:59:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 00:59:32 +0000 (UTC) Cc: acm@muc.de, 23785@debbugs.gnu.org To: "Phillip Lord" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 20 02:59:20 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 1bEnYc-0002cK-Ff for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 02:59:18 +0200 Original-Received: from localhost ([::1]:40619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEnYY-0001Ei-F1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Jun 2016 20:59:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEnYP-0001EX-Ji for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:59:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEnYM-0000yw-GG for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:59:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEnYM-0000yl-D5 for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bEnYM-0002LU-2c for bug-gnu-emacs@gnu.org; Sun, 19 Jun 2016 20:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 00:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14663842868935 (code B ref 23785); Mon, 20 Jun 2016 00:59:02 +0000 Original-Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 00:58:06 +0000 Original-Received: from localhost ([127.0.0.1]:46820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEnXN-0002Je-0I for submit@debbugs.gnu.org; Sun, 19 Jun 2016 20:58:06 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEnXK-0002JU-Ma for 23785@debbugs.gnu.org; Sun, 19 Jun 2016 20:57:59 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u5K0vtbJ025822; Sun, 19 Jun 2016 20:57:55 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1E80C6614D; Sun, 19 Jun 2016 20:59:33 -0400 (EDT) In-Reply-To: (Phillip Lord's message of "Sun, 19 Jun 2016 23:45:44 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5711=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5711> : inlines <4940> : streams <1654777> : uri <2234330> 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:119803 Archived-At: > The other fiddles with insert-file-contents and adds an undo. It is this > function that has specialized handling for the undo list that is causing > the problem. My patch in this case is questionable in that I have randomly > pushed a call to undo-boundary near the end. It should probably be > somewere better. Indeed, the problem is not that insert-file-contents fails to add a boundary, but rather that it removes an existing one, so we should figure out where/why it removes it and change the code to push one back after removing it. > Another possibility would be to have insert-file-contents call > "undo-auto--undoable-change" -- this is the root cause of the problem. Figuring out why undo-auto--undoable-change isn't called for it would be good as well, indeed. After all, it runs after-change-functions, so it should call undo-auto--undoable-change. Stefan