From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: [babel] file header argument includes other variable Date: Fri, 30 Mar 2012 21:23:51 +0200 Message-ID: <87iphldha0.fsf@med.uni-goettingen.de> References: <4F7465F0.2090708@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDhR9-00010r-M5 for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 15:24:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDhR7-0007HX-7z for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 15:24:39 -0400 Received: from plane.gmane.org ([80.91.229.3]:39706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDhR7-0007HK-1I for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 15:24:37 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SDhR3-0002Z8-T7 for emacs-orgmode@gnu.org; Fri, 30 Mar 2012 21:24:33 +0200 Received: from vpn-2111.gwdg.de ([134.76.2.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Mar 2012 21:24:33 +0200 Received: from andreas.leha by vpn-2111.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Mar 2012 21:24:33 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Rainer M Krug 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 > > #+RESULTS: > [[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) #+end_src #+RESULTS: [[file:SA_(19).pdf]] Best, Andreas