emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Erich Neuwirth <erich.neuwirth@univie.ac.at>
Cc: "emacs-orgmode@gnu.org emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Inline and executing the document
Date: Wed, 19 Sep 2012 08:09:16 -0600	[thread overview]
Message-ID: <87627ac5rh.fsf@gmx.com> (raw)
In-Reply-To: E89691E7-74DE-45AF-9F82-137511A1AE56@univie.ac.at

Erich Neuwirth <erich.neuwirth@univie.ac.at> 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

  reply	other threads:[~2012-09-19 18:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 13:44 Inline and executing the document Erich Neuwirth
2012-09-19 14:09 ` Eric Schulte [this message]
2012-09-20 14:23 ` Neuwirth Erich
2012-09-20 14:33   ` Eric Schulte
2012-09-20 19:09   ` Neuwirth Erich
2012-09-23 17:02     ` Erich Neuwirth
2012-09-23 18:17       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87627ac5rh.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=erich.neuwirth@univie.ac.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).