From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [bug] [babel] babel corrupts undo history Date: Wed, 28 Aug 2013 08:42:10 -0600 Message-ID: <87d2oxanct.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEgws-0001uP-5w for emacs-orgmode@gnu.org; Wed, 28 Aug 2013 10:42:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEgwm-00088y-GX for emacs-orgmode@gnu.org; Wed, 28 Aug 2013 10:42:18 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:51479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEgwm-00088j-3g for emacs-orgmode@gnu.org; Wed, 28 Aug 2013 10:42:12 -0400 Received: by mail-pa0-f48.google.com with SMTP id kp13so6314011pab.35 for ; Wed, 28 Aug 2013 07:41:55 -0700 (PDT) In-Reply-To: (Samuel Wales's message of "Tue, 27 Aug 2013 18:13:27 -0700") 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: Samuel Wales Cc: emacs-orgmode@gnu.org I don't understand. Is the problem that edits made in the indirect buffer are not spliced into the undo history of the Org-mode buffer? Samuel Wales writes: > 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 < test > EOF > ) 2>&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. -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D