From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: [bug] [babel] babel corrupts undo history Date: Fri, 21 Mar 2014 17:44:54 -0700 Message-ID: References: <87d2oxanct.fsf@gmail.com> <87hae9ajz2.fsf@gmail.com> <87bo4h8x63.fsf@gmail.com> <877gcx19zc.fsf@gmail.com> <871u3517no.fsf@gmail.com> <87lhw7cjws.fsf@bzg.ath.cx> <87r45vkxxm.fsf@bzg.ath.cx> <87bnwzktmx.fsf@bzg.ath.cx> <877g7njdak.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRA3U-0004AT-5w for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 20:44:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRA3T-00042A-7d for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 20:44:56 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Eric Schulte here is the fix for bug #3: change this line in org-src.el (let ((buffer-undo-list t)) to: ;; don't change my undo list here, please (progn this fixes the problem. i really don't think this kind of fancy undo list manipulation is the right thing to do in org. On 3/21/14, Samuel Wales wrote: > bug #3: > > insert a source block > edit after it > c-c ' to edit > edit > c-c ' to go back to mybuffer > edit before the source block > undo > undo > > you should notice that the source block is not restored. > > note that this is not the same buffer corruption issue i reported > previously. > > in that one, you insert a source block, fill it, and undo. then the > next header line gets corrupted: > > bug #2: > > * header > #+begin_src org > asdf > asdf > #+end_src > * header2 > > put point inside the source block, fill, then undo. you will see > buffer corruption after the source block. the exact corruption > varies. sometimes it is removal of the #. other times it is removal > of * in 1 or 2 headlines below. > > what makes it much worse is that you cannot undo to fix the buffer > corruption. you have to revert the buffer. > > there are others. i believe the reason is that org tries to get fancy > with undo. > -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. And ANYBODY can get it. Denmark: free Karina Hansen NOW.