emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <r.m.krug@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Actual value of variable in tangled source file instead of variable
Date: Mon, 20 Jun 2011 13:21:09 +0200	[thread overview]
Message-ID: <BANLkTin_9RU3XHAR9RZNTPxKEXxDQKk80OYPY90qADXoJ9TVcw@mail.gmail.com> (raw)

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

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 <Rainer@krugs.de>
  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

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

                 reply	other threads:[~2011-06-20 11:21 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=BANLkTin_9RU3XHAR9RZNTPxKEXxDQKk80OYPY90qADXoJ9TVcw@mail.gmail.com \
    --to=r.m.krug@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).