update packages
This commit is contained in:
5
lisp/org/testing/examples/babel.el
Normal file
5
lisp/org/testing/examples/babel.el
Normal file
@@ -0,0 +1,5 @@
|
||||
(string-match-p "^#[[:digit:]]+$" "#123")
|
||||
|
||||
;; [[id:73115FB0-6565-442B-BB95-50195A499EF4][detangle:1]]
|
||||
;; detangle changes
|
||||
;; linked content to detangle:1 ends here
|
||||
@@ -488,3 +488,16 @@ nil
|
||||
#+BEGIN_SRC emacs-lisp :output-dir xxx :file foo.bar
|
||||
nil
|
||||
#+END_SRC
|
||||
* detangle
|
||||
** false positive
|
||||
The =[[= causes a false positive which ~org-babel-detangle~ should handle properly
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(string-match-p "^#[[:digit:]]+$" "#123")
|
||||
#+end_src
|
||||
** linked content to detangle
|
||||
:PROPERTIES:
|
||||
:ID: 73115FB0-6565-442B-BB95-50195A499EF4
|
||||
:END:
|
||||
#+begin_src emacs-lisp :tangle yes :comments link
|
||||
;; detangle
|
||||
#+end_src
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
return 0;
|
||||
#+end_src
|
||||
|
||||
#+source: simple
|
||||
#+begin_src cpp :includes <iostream> :results silent
|
||||
std::cout << 42;
|
||||
return 0;
|
||||
#+end_src
|
||||
|
||||
#+source: simple
|
||||
#+begin_src D :results silent
|
||||
writefln ("%s", 42);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
:ID: 0ba56632-8dc1-405c-a083-c204bae477cf
|
||||
:END:
|
||||
** Generic shell: no arrays
|
||||
#+begin_src sh :exports results :var array=sample_array
|
||||
#+begin_src sh :exports results :results output :var array=sample_array
|
||||
echo ${array}
|
||||
#+end_src
|
||||
|
||||
@@ -34,7 +34,7 @@ Bash will see a simple indexed array. In this test, we check that the
|
||||
returned value is indeed only the first item of the array, as opposed to
|
||||
the generic serialiation that will return all elements of the array as
|
||||
a single string.
|
||||
#+begin_src bash :exports results :var array=sample_array
|
||||
#+begin_src bash :exports results :results output :var array=sample_array
|
||||
echo ${array}
|
||||
#+end_src
|
||||
|
||||
@@ -47,7 +47,7 @@ echo ${array}
|
||||
:END:
|
||||
** Generic shell: no special handing
|
||||
The shell will see all values as a single string.
|
||||
#+begin_src sh :exports results :var table=sample_mapping_table
|
||||
#+begin_src sh :exports results :results output :var table=sample_mapping_table
|
||||
echo ${table}
|
||||
#+end_src
|
||||
|
||||
@@ -57,7 +57,7 @@ echo ${table}
|
||||
** Bash shell: support for associative arrays
|
||||
Bash will see a table that contains the first column as the 'index'
|
||||
of the associative array, and the second column as the value.
|
||||
#+begin_src bash :exports results :var table=sample_mapping_table
|
||||
#+begin_src bash :exports :results output results :var table=sample_mapping_table
|
||||
echo ${table[second]}
|
||||
#+end_src
|
||||
|
||||
@@ -69,7 +69,7 @@ echo ${table[second]}
|
||||
:ID: 82320a48-3409-49d7-85c9-5de1c6d3ff87
|
||||
:END:
|
||||
** Generic shell: no special handing
|
||||
#+begin_src sh :exports results :var table=sample_big_table
|
||||
#+begin_src sh :exports results :results output :var table=sample_big_table
|
||||
echo ${table}
|
||||
#+end_src
|
||||
|
||||
@@ -79,7 +79,7 @@ echo ${table}
|
||||
** Bash shell: support for associative arrays with lists
|
||||
Bash will see an associative array that contains each row as a single
|
||||
string. Bash cannot handle lists in associative arrays.
|
||||
#+begin_src bash :exports results :var table=sample_big_table
|
||||
#+begin_src bash :exports results :results output :var table=sample_big_table
|
||||
echo ${table[spaghetti]}
|
||||
#+end_src
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#+property: header-args :var foo=1
|
||||
#+property: header-args+ :var bar=2
|
||||
:PROPERTIES:
|
||||
:header-args: :var foo=1
|
||||
:header-args+: :var bar=2
|
||||
:END:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(+ foo bar)
|
||||
|
||||
Reference in New Issue
Block a user