emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: [babel] file header argument includes other variable
Date: Fri, 30 Mar 2012 21:23:51 +0200	[thread overview]
Message-ID: <87iphldha0.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 4F7465F0.2090708@gmail.com

Rainer M Krug <r.m.krug@gmail.com> writes:

> Hi
> I would like to do make the file header argument to be concatenated of a constant string and
> another variable, so effectively:
> #+header: :var+ ConNum="10"
> #+header: :results graphics
> #+header: :file SA_VALUEOFConNum.pdf
> #+header: :width 8
> #+header: :height 8
> #+header: :pointsize 8
> #+begin_src R
>   plot(runif(100))
> #+end_src
> [[file:SA_10.pdf]]
> Is this possible?
> Thanks,
> Rainer

Hi Rainer,

I am not aware of any method that directly does what you want.  But depending on
where the value of your variable ConNum is coming from, the
following might be a start for you.  It is based on the possibility to
insert elisp in the header arguments:

#+name: myconnum
- 19

#+header: :var ConNum=myconnum
#+header: :results graphics
#+header: :file (concat "SA_" (sbe myconnum) ".pdf")
#+header: :width 8
#+header: :height 8
#+header: :pointsize 8
#+begin_src R
  plot(runif(100), main=ConNum)



      reply	other threads:[~2012-03-30 19:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 13:38 [babel] file header argument includes other variable Rainer M Krug
2012-03-30 19:23 ` Andreas Leha [this message]

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:

  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=87iphldha0.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \


* 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


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