According to the Org mode docs, it is possible to customize whether the code block will be exported or not.
Using Org Babel features, it is possible to set :results output
to a code block and render the results within a #+RESULTS:
code block:
puts "Hello world"
One thing about the #+RESULTS:
code blocks, is that they exist in several forms:
- As an accumulated group of inline examples:
- As an example code block. By default, the
10.times {|n| puts n }
- Also, in case
:results output code
is used, the results would be a src block of the same language as the original one.counter = 0 10.times { puts "puts '#{counter += 1}'" } # Displayed in first code block puts counter # Displayed in second code block
Only the code would be in the output, the same as when no option is set.
var message = "Hello world!";
console.log(message);
This omits both the resulting block, and the code block itself.
As of OrgRuby 0.9.1, this is what has been implemented, so old tests would need to add :exports both to code blocks.
Math::PI
This option can’t be supported by OrgRuby since we would have to eval the code block using :lang, so Org Babel features would have to be implemented as well.
Implementation for this is under consideration and leaving as a no-op for now.
3.141592653589793