emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Code block option :results raw does not replace #+RESULTS
Date: Fri, 31 Jan 2014 18:16:42 -0500	[thread overview]
Message-ID: <87bnyr91yd.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: 1391204719.2534.23.camel@raven-CM5571

Soapy Smith <soapy-smith@comcast.net> writes:

> Hello-
>
> Here is an example Python code block:
>
> #+begin_src python :results value raw
>  a = (1, 2, 3, 4)
>  return a
> #+end_src
>
> #+RESULTS:
> (1, 2, 3, 4)
> (1, 2, 3, 4)
>
> The #+RESULT block above is after 2 evaluations.
> The default behavior of "replace" is not happening.  The result "stack"
> will continue to grow with additional evaluations.
>
> I also confirmed the same behavior with a Clojure code block.
>
> Is this the expected behavior for this option?
>

Yes - raw does not keep track of where the results begin and end and
cannot erase the old ones before adding the new ones. Try
calling org-babel-remove-result: you'll see that it gets rid of the
#+RESULTS: line but it doesn't touch the actual results. Once it has
inserted them, they become part of the buffer, outside the jurisdiction
of the code block/babel.

Nick

  parent reply	other threads:[~2014-01-31 23:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 16:50 Export Dispatcher Insert Template Not Working? Soapy Smith
2014-01-31 17:04 ` Bastien
2014-01-31 21:05   ` Soapy Smith
2014-01-31 21:24 ` Python Code Block error with header option :results output Soapy Smith
2014-01-31 21:33   ` Ahmadou Dicko
2014-01-31 21:33   ` Eric Schulte
2014-02-01  6:56     ` Christian Moe
2014-02-01 12:34       ` Soapy Smith
2014-01-31 21:45 ` Code block option :results raw does not replace #+RESULTS Soapy Smith
2014-01-31 21:54   ` John Hendy
2014-01-31 23:16   ` Nick Dokos [this message]
2014-02-01 12:01     ` Soapy Smith

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=87bnyr91yd.fsf@alphaville.bos.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).