From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: [bug] [babel] babel corrupts undo history Date: Tue, 27 Aug 2013 18:13:27 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEUKP-0001K0-9U for emacs-orgmode@gnu.org; Tue, 27 Aug 2013 21:13:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEUKO-0007Kn-7l for emacs-orgmode@gnu.org; Tue, 27 Aug 2013 21:13:45 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:38886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEUKO-0007Ke-1G for emacs-orgmode@gnu.org; Tue, 27 Aug 2013 21:13:44 -0400 Received: by mail-wi0-f181.google.com with SMTP id ex4so2844000wid.2 for ; Tue, 27 Aug 2013 18:13:27 -0700 (PDT) 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: emacs-orgmode@gnu.org c-c ' c-c ' on this. then undo or undo-tree-undo. what happens is data corruption. to me, undo is a low-level operation that should always work, even with a syntactically invalid block. a relevant variable is org-src-preserve-indentation. it is possible to change it without changing a block. === #+BEGIN_SRC sh :noweb yes :results verbatim output ( cat <&1 : #+END_SRC === Emacs 24.2, recent Org, recent undo-tree-mode. Thanks. Samuel P.S. You might be wondering why I use a subshell and a redirection followed by a null command. This is because I prefer to bypass Babel's error mechanism, which I find confusing. Doing exactly as above is the only way I know to get Babel to work the way I prefer (although {} might or might not work also). I always do this for every block. IMO it would be great for newcomers if there were options in Babel sh blocks for exactly this. -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.