Rainer M Krug <r.m.k...@gmail.com> writes: > Hi > > For one project, I am usinr org to write submit scripte to a cluster > runing torqu. The important bit in this is, that between the shebang and > the code, no other executable line must occur. As I am using variables > in org (:var) they will occur just after the shebang, which causes a > problem for torque. So, my question is, is there a way to "unset" > variables defined by using :var for a subtree? >
Hi Rainer, Interesting question... unfortunately I don't think that removing variables from header arguments is possible under the current setup. Perhaps in your case you could add a function to the post-tangle hook, which recognizes when it is being called in a just-tangled torqu script (maybe by searching for a series of #PBS lines), and then removes any lines between the shebang and the first #PBS line? More generally, I wonder what a natural method would be to allow unsetting of pre-set header arguments for local blocks or subtrees? This may only apply to the :var header argument, as most others have a default setting which can be actively set. If you have any ideas for a natural syntax for such an operation I'd be happy to hear it. Cheers -- Eric > > #+BABEL: :session *R* :results output :exports both :tangle > Analysis_sensitivity.R :var RESULTSDIR="/media/Results/" :var > ANALYSISDIR="~/Documents/Projects/analysis/" > > > * submit script (SA.sub) > :PROPERTIES: > :tangle: ./SA.sub > :exports: code > :END: > #+begin_src sh > #PBS -j y > #PBS -M rai...@krugs.de > #PBS -V > #PBS -l nodes=1:mem=4gb > ## > cd $PBS_O_WORKDIR > #+end_src > > I would need the tangled code to be : > > #!/bin/bash > #PBS -j y > #PBS -M rai...@krugs.de > #PBS -V > #PBS -l nodes=1:mem=4gb > ## > cd $PBS_O_WORKDIR > > But it is > > #!/bin/bash > RESULTSDIR=/media/Results/ > ANALYSISDIR=~/Documents/Projects/analysis/ > #PBS -j y > #PBS -M rai...@krugs.de > #PBS -V > #PBS -l nodes=1:mem=4gb > ## > cd $PBS_O_WORKDIR > > > But RESULTSDIR and ANALYSISDIR is used in the remainder of the document > (several other subtrees) > > Any help appreciated, > > Rainer _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode