From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Inline and executing the document Date: Wed, 19 Sep 2012 08:09:16 -0600 Message-ID: <87627ac5rh.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEOp0-0001gh-RN for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 14:16:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEOoz-0001lz-2f for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 14:16:26 -0400 Received: from mailout-eu.gmx.com ([213.165.64.43]:57624) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TEOoy-0001hy-Po for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 14:16:25 -0400 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: Erich Neuwirth Cc: "emacs-orgmode@gnu.org emacs-orgmode@gnu.org" Erich Neuwirth writes: > The following examples shows some issues > All of these examples execute as expected. It is not always possible to automatically identify and remove the results of a code block execution. Remember that Org-mode files are just plain text. > > #+title: Inline formatting > > Inline code examples > > src_emacs-lisp{(+ 2 3)} > Inline code blocks like the above are mainly intended for use during execution, not to be executed in the buffer during normal use. > > src_emacs-lisp[:results raw]{(2 + 5)} > The above is not valid elisp, but the same statement still applies. > > #+BEGIN_SRC emacs-lisp > (+ 11 12) > #+END_SRC > > #+RESULTS: > : 23 > > #+BEGIN_SRC emacs-lisp :results raw > (+ 11 13) > #+End_Src > By definition "raw" results are not marked in any way and thus can not be removed from the buffer. Maybe try ":results wrap" if you want un-quoted un-exampled results which can still be automatically removed. Best, > > ################################## > > In 3 of the 4 examples running the code repeatedly > with C-c C-c > will produce multiple copies of the output. > Only the default code block (example 3) > "knows" to delete the old result when a new one is produced. > > If one is not careful about this, one can easily produce inconsistent documents. > Changing the code but not the old results will keep different results within the document > and these results will also be exported. > > A solution would be to have markers like > > #+begin_results > #+end_results > > Then, org mode could know what exactly to delete. > This would need to me modified for inline src statements bit should be doable. > > I think this could help with the general concept of producing consistent reproducible research documents. > > Anny suggestions regarding this issue? > > Erich > > > > > > > > -- Eric Schulte http://cs.unm.edu/~eschulte