Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun extract-src-content (name)
- (save-excursion
- (org-babel-goto-named-src-block name)
- (car (nthcdr 21 (cadr (org-element-at-point))))))
- (org-element-property :value (org-element-at-point))
- #+NAME: sine
- #+BEGIN_SRC python
- import math
- x=math.sin(math.pi)
- #+END_SRC
- #+BEGIN_SRC python :noweb yes :results output :exports results
- text="""
- <<sine>>
- """
- print text
- #+END_SRC
- #+RESULTS:
- :
- : import math
- :
- : x=math.sin(math.pi)
- :
- #+BEGIN_SRC python :noweb yes :results output :exports results
- text="""
- <<sine>>
- """[:-1]
- print text
- #+END_SRC
Add Comment
Please, Sign In to add comment