From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.bugs Subject: bug#11774: [O] bug#11774: org-mode causes undo boundaries to be lost Date: Tue, 3 Jul 2012 11:57:29 +0200 Message-ID: <20120703095729.GA6651@c3po> References: <20120624212755.GA14501@c3po.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1341330357 17331 80.91.229.3 (3 Jul 2012 15:45:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Jul 2012 15:45:57 +0000 (UTC) Cc: Bastien , 11774@debbugs.gnu.org To: Martin Pohlack Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 03 17:45:55 2012 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 1Sm5IR-00031r-JW for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jul 2012 17:45:47 +0200 Original-Received: from localhost ([::1]:33336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm5IQ-0003tU-Ki for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jul 2012 11:45:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm5IJ-0003tB-CY for bug-gnu-emacs@gnu.org; Tue, 03 Jul 2012 11:45:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm5ID-0003q5-4c for bug-gnu-emacs@gnu.org; Tue, 03 Jul 2012 11:45:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm5I0-0003hp-Ja; Tue, 03 Jul 2012 11:45:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sm5MX-00032c-Uo; Tue, 03 Jul 2012 11:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Toby Cubitt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Tue, 03 Jul 2012 15:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11774 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: Original-Received: via spool by 11774-submit@debbugs.gnu.org id=B11774.134133055211622 (code B ref 11774); Tue, 03 Jul 2012 15:50:01 +0000 Original-Received: (at 11774) by debbugs.gnu.org; 3 Jul 2012 15:49:12 +0000 Original-Received: from localhost ([127.0.0.1]:45424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sm5Lj-00031O-Fx for submit@debbugs.gnu.org; Tue, 03 Jul 2012 11:49:12 -0400 Original-Received: from starfish.geekisp.com ([216.168.135.166]:4352) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sm2ss-00073s-2g for 11774@debbugs.gnu.org; Tue, 03 Jul 2012 09:11:14 -0400 Original-Received: (qmail 28190 invoked by uid 1003); 3 Jul 2012 13:06:32 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Tue, 03 Jul 2012 09:06:29 -0400 Content-Disposition: inline In-Reply-To: <4FF14504.10609@os.inf.tu-dresden.de> X-PGP-Key: http://www.dr-qubit.org/gpg-toby.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) X-Primary-Address: toby@dr-qubit.org X-Mailman-Approved-At: Tue, 03 Jul 2012 11:49:09 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61529 Archived-At: On Mon, Jul 02, 2012 at 08:51:48AM +0200, Martin Pohlack wrote: > > I'm still not entirely convinced that the boundary discarding logic in > > org-self-insert-command is correct. For example, if I do the following: > > > > 1. Type some text at some location in an org-mode buffer > > 2. Move to another location very far away > > (without invoking any commands other than point motion) > > 3. Type some more text > > > > then org-self-insert-cluster-for-undo collapses the undo changesets for > > these two changes into one. Undoing then reverts both sets of changes at > > once, even though those changes might be so far apart that they aren't > > both visible at the same time in the buffer. > > > > That seems very undesirable to me. > > Having been involved in org-mode's collapsing code I am interested in > this, but I cannot reproduce your problem. I used a very large org-mode > file, inserted some text, moved down some pages and inserted some text > again (3 chars each). Undoing was split between both parts, exactly as > desired. Could you provide more details please? Sure. The following steps produce the effect I described, at least for me. This is on a fairly recent (a couple of weeks old) bzr build of Emacs, and a similarly recent git build of org-mode: 1. $ emacs -Q 2. C-x C-f test.org 3. M-x org-mode [not really necessary since already in org-mode] 5. C-u 50 M-x newline 6. M-< 7. type "a" 8. M-> 9. type "bc" buffer-undo-list now contains: (nil (52 . 54) (1 . 2) nil (1 . 51) (t . -1)) Note the lack of undo boundary between (52 . 54) and (1 . 2), which means that undoing once (C-/) deletes both "bc" *and* "a" in one step. HTH, Toby -- Dr T. S. Cubitt Mathematics and Quantum Information group Department of Mathematics Complutense University Madrid, Spain email: tsc25@cantab.net web: www.dr-qubit.org