From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Actual value of variable in tangled source file instead of variable Date: Mon, 20 Jun 2011 13:21:09 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00163641811da4738904a622ee3e Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYcXZ-00056z-RP for emacs-orgmode@gnu.org; Mon, 20 Jun 2011 07:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYcXX-0005NC-Gn for emacs-orgmode@gnu.org; Mon, 20 Jun 2011 07:21:13 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:44833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYcXX-0005N1-1G for emacs-orgmode@gnu.org; Mon, 20 Jun 2011 07:21:11 -0400 Received: by qwa26 with SMTP id 26so1883326qwa.0 for ; Mon, 20 Jun 2011 04:21:09 -0700 (PDT) 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 --00163641811da4738904a622ee3e Content-Type: text/plain; charset=ISO-8859-1 Hi I am using R for package writing in R, and the org file is under svn version control. I would like to keep the version of the R package, as stated in the DESCRIPTION file, in sync with the svn revision, so I thought about using variables for that. But my approach below obviosly does not work, as in the tangled DESCRIPTION file, it says Version: 0.$VER Is it possible to have, during tangling, the actual value in the source file instead of the variable? Thanks, Rainer * The DESCRIPTION File #+begin_src sh :tangle ./asm/DESCRIPTION :shebang :padline no :var VER=(vc-working-revision (buffer-file-name)) Package: asm Type: Package Title: Alien spread management simulation model Version: 0.$VER Date: 2011-06-08 Author: Rainer M. Krug Maintainer: Rainer M Krug Description: For research License: GPL-3 LazyLoad: yes Depends: simecol, sp, maptools, spgrass6, RSQLite, Rcpp (>= 0.9.4) LinkingTo: Rcpp #+end_src -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --00163641811da4738904a622ee3e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi

I am using R for package writing in R, and= the org file is under svn version control.=A0

I w= ould like to keep the version of the R package, as stated in the DESCRIPTIO= N file, in sync with the svn revision, so I thought about using variables f= or that.

But my approach below obviosly does not work, as in the= tangled DESCRIPTION file, it says Version: 0.$VER

Is it possible to have, during tangling, the actual value in the source fi= le instead of the variable?=A0

Thanks,

Rainer

<= /div>
* The DESCRIPTION File
=A0#+begin_src sh :tangle ./asm/= DESCRIPTION :shebang :padline no :var VER=3D(vc-working-revision (buffer-fi= le-name))
=A0 Package: asm
=A0 Type: Package
=A0 Title: Alie= n spread management simulation model
=A0 Version: 0.$VER
=A0 Date: 2011-06-08
=A0 Author: Rainer M. Krug
=A0 M= aintainer: Rainer M Krug <Rainer@krug= s.de>
=A0 Description: For research
=A0 License: GPL-3
= =A0 LazyLoad: yes
=A0 Depends: simecol, sp, maptools, spgrass6, R= SQLite, Rcpp (>=3D 0.9.4)
=A0 LinkingTo: Rcpp
=A0=A0=
=A0#+end_src

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservati= on Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Inv= asion Biology
Stellenbosch University
South Africa

Tel : =A0 = =A0 =A0 +33 - (0)9 53 10 27 44
Cell: =A0 =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 =A0 =A0 +33 - (0)9= 58 10 27 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 22 44

email:= =A0 =A0 =A0Rainer@kru= gs.de

Skype: =A0 =A0 =A0RMkrug

--00163641811da4738904a622ee3e--