emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kalev Takkis <kalev.takkis@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Babel, var vrom property drawer in function call?
Date: Thu, 3 Sep 2015 20:42:31 +0300	[thread overview]
Message-ID: <CAMeOJK4rjeSkpbFeXFE-pQ0HOjw3=Rm16zxs0zTmRxcCvUj07w@mail.gmail.com> (raw)

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

Hi list,

Is there a way to use variables defined as :var: in :PROPERTIES: drawer in
function call? Such as

** Some heading
   :PROPERTIES:
   :var:      par1="smth"
   :END:

   #+call: some-function(parameter=par1)


Better yet, is there a way to have the function itself to figure out which
properties are in effect in a place where a function is called from? What I
mean is, when i have a code block

#+name: some-function
#+begin_src sh :results code
   echo $par1
#+end_src

defined under ** Some heading, evaluating the function will echo the value
of par1. But when the function is defined somewhere where par1 is not
defined, calling it under ** Some heading with #+call doesn't work. Can I
somehow instruct org to automatically use the parameter value from the
place where the function is called with #+call, rather than where its body
is defined?

All the best,
Kalev

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

                 reply	other threads:[~2015-09-03 17:42 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='CAMeOJK4rjeSkpbFeXFE-pQ0HOjw3=Rm16zxs0zTmRxcCvUj07w@mail.gmail.com' \
    --to=kalev.takkis@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).