From: Dror Atariah <drorata@gmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Scope of properties as variables for babel blocks
Date: Tue, 16 Sep 2014 09:58:36 +0200 [thread overview]
Message-ID: <CANfRcg36=U8zfmNa-Fupad_=gDwCFt5fkQ6ZsuuSzEEQBZyMOQ@mail.gmail.com> (raw)
[-- 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 --]
reply other threads:[~2014-09-16 7:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CANfRcg36=U8zfmNa-Fupad_=gDwCFt5fkQ6ZsuuSzEEQBZyMOQ@mail.gmail.com' \
--to=drorata@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).