emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Scope of properties as variables for babel blocks
@ 2014-09-16  7:58 Dror Atariah
  0 siblings, 0 replies; only message in thread
From: Dror Atariah @ 2014-09-16  7:58 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

#+title: Scope of properties as variables for babel blocks
* Overview

I have the following scenario in mind: =func1= and =func2= are two
functions that can be executed in two modes: =foo= and =bar=. Each
mode yields a different set of results, that have to be discussed,
separately, in two different subtrees.

The goal is to have one subtree where they are executed in one mode
and a second subtree for the other mode.

The functions are defined in a dedicated [[Code][subtree]].

* Bar setting

Now, I want to execute the function in =bar= mode:
#+PROPERTY:  var mode="bar"

#+CALL: func1()

#+RESULTS:
: default

#+CALL: func2()

#+RESULTS:
: default

* Foo setting

In this node I want to execute  the functions in =foo= mode:
#+PROPERTY:  var mode="foo"

#+CALL: func1()

#+RESULTS:
: default

#+CALL: func2()

#+RESULTS:
: default

* Code
#+name: func1
#+begin_src python
return mode
#+end_src

#+RESULTS: func1
: foo

#+name: func2
#+begin_src python
return mode
#+end_src

#+RESULTS: func2
: default-val

* Question:

How can I implement this kind of workflow in a reproducible org mode
document?

[-- Attachment #2: Type: text/html, Size: 1868 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-16  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16  7:58 Scope of properties as variables for babel blocks Dror Atariah

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).