emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Actual value of variable in tangled source file instead of variable


From: Rainer M Krug
Subject: [O] Actual value of variable in tangled source file instead of variable
Date: Mon, 20 Jun 2011 13:21:09 +0200

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 <address@hidden>
  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:      address@hidden

Skype:      RMkrug


reply via email to

[Prev in Thread] Current Thread [Next in Thread]