1 #+TITLE: Tests for default header arguments to Babel source blocks
3 #+PROPERTY: var t1="go1" t3="go3_clobbered"
4 #+PROPERTY: var+ t2="go2" t3="go3"
5 #+PROPERTY: header-args :var t1="gh1" t2="gh2_clobbered"
6 #+PROPERTY: header-args+ :var t4="gh4" t2="gh2" :var end=9
7 #+PROPERTY: header-args:emacs-lisp :var t1="ge1" t4="ge4_clobbered"
8 #+PROPERTY: header-args:emacs-lisp+ :var t4="ge4" :var t5="ge5"
9 #+PROPERTY: header-args:emacs-lisp+ :results silent :noweb yes
12 #+BEGIN_SRC emacs-lisp :execute no
13 (mapconcat (lambda (n)
14 (let* ((n (string (+ 48 n)))
15 (p (intern (concat "t" n))))
16 (if (boundp p) (eval p) (concat "--" n))))
17 (number-sequence 1 end)
23 :ID: 3fdadb69-5d15-411e-aad0-f7860cdd7816
26 | Global | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 |
27 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
28 | var property | go1 | go2 | go3 | --- | --- | --- | --- | --- | --- |
29 | header-args | gh1 | gh2 | --- | gh4 | --- | --- | --- | --- | --- |
30 | header-args:emacs-lisp | ge1 | --- | --- | ge4 | ge5 | --- | --- | --- | --- |
31 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
32 | Result | ge1 | gh2 | go3 | ge4 | ge5 | --6 | --7 | --8 | --9 |
34 #+CALL: showvar() :results silent
35 #+BEGIN_SRC emacs-lisp :var end=7
42 :ID: a9cdfeda-9f31-4bb5-b694-2cf452f07dfd
44 :header-args: :var t7="th7"
45 :header-args:emacs-lisp: :var t8="te8"
46 :header-args:emacs-lisp+: :results silent :noweb yes :var end=9
49 | Global | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 |
50 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
51 | var property | go1 | go2 | go3 | --- | --- | --- | --- | --- | --- |
52 | header-args | gh1 | gh2 | --- | gh4 | --- | --- | --- | --- | --- |
53 | header-args:emacs-lisp | ge1 | --- | --- | ge4 | ge5 | --- | --- | --- | --- |
54 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
55 | Tree | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 |
56 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
57 | var property | --- | --- | --- | --- | --- | to6 | --- | --- | --- |
58 | header-args | --- | --- | --- | --- | --- | --- | th7 | --- | --- |
59 | header-args:emacs-lisp | --- | --- | --- | --- | --- | --- | --- | te8 | --- |
60 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
61 | Result #+CALL | go1 | go2 | go3 | --4 | --5 | --- | th7 | te8 | --9 |
62 | Result noweb | --1 | --2 | --3 | --4 | --5 | to6 | th7 | te8 | --9 |
64 #+CALL: showvar() :results silent
65 #+BEGIN_SRC emacs-lisp
71 :ID: 1d97d258-fd50-4107-a095-e4625bffc57b
74 :header-args+: :var t2="th2" t3="th3"
75 :header-args:emacs-lisp+: :var t5="te5" end=8
78 | Global | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 |
79 |-------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
80 | var property | go1 | go2 | go3 | --- | --- | --- | --- | --- | --- |
81 | header-args | gh1 | gh2 | --- | gh4 | --- | --- | --- | --- | --- |
82 | header-args:emacs-lisp | ge1 | --- | --- | ge4 | ge5 | --- | --- | --- | --- |
83 |-------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
84 | Tree | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 |
85 |-------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
86 | var+ property | to1 | --- | --- | --- | --- | to6 | --- | --- | --- |
87 | header-args+ | --- | th2 | th3 | --- | --- | --- | --- | --- | --- |
88 | header-args:emacs-lisp+ | --- | --- | --- | --- | te5 | --- | --- | --- | --- |
89 |-------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
90 | Result #+CALL | ge1 | th2 | th3 | ge4 | te5 | --6 | --7 | --8 | --9 |
91 | Result noweb | ge1 | th2 | th3 | ge4 | te5 | to6 | --7 | --8 | --9 |
93 #+CALL: showvar(end=6) :results silent
94 #+BEGIN_SRC emacs-lisp
100 :ID: fa0e912d-d9b4-47b0-9f9e-1cbb39f7cbc2
103 :header-args+: :var t2="th2"
104 :header-args:emacs-lisp: :var t5="te5" end=7
105 :header-args:emacs-lisp+: :results silent :noweb yes :var end=9
108 | Global | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 |
109 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
110 | var property | go1 | go2 | go3 | --- | --- | --- | --- | --- | --- |
111 | header-args | gh1 | gh2 | --- | gh4 | --- | --- | --- | --- | --- |
112 | header-args:emacs-lisp | ge1 | --- | --- | ge4 | ge5 | --- | --- | --- | --- |
113 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
114 | Tree | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | t9 |
115 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
116 | var property | to1 | --- | --- | --- | --- | to6 | --- | --- | --- |
117 | header-args+ | --- | th2 | --- | --- | --- | --- | --- | --- | --- |
118 | header-args:emacs-lisp | --- | --- | --- | --- | te5 | --- | --- | --- | --- |
119 |------------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----|
120 | Result #+CALL | gh1 | th2 | go3 | gh4 | te5 | --6 | --7 | --8 | --9 |
121 | Result noweb | gh1 | th2 | --3 | gh4 | te5 | to6 | --7 | --8 | --9 |
123 #+CALL: showvar(end=6) :results silent
124 #+BEGIN_SRC emacs-lisp