我正在尝试使用 org-mode 和 babel 编写代码测试用例,但无法通过第一步:
* Running code example
Set up some variables
#+begin_src python :results output :session
x=1
#+end_src
Use some variables (in the end I'll have more useful
explanatory text between the code blocks).
#+begin_src python :exports both :results output :session
print "Hi", x
#+end_src
C-c
由于第二个块尚未x
定义,因此按顺序击中块失败。
导出文件(如果重要的话,导出为 PDF)似乎执行了所有代码块,但RESULTS
第二个块的代码块没有被构造并插入到缓冲区中。
如何修改代码块上的开关,以便在会话中执行所有操作,并将结果嵌入到 org 缓冲区中?
org-version=7.9.3f