【发布时间】:2014-06-05 13:37:14
【问题描述】:
我正在尝试使用 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-version=7.9.3f
【问题讨论】:
-
我没有 Python,所以无法尝试。但是我看不出它为什么不起作用的明显原因,只要它在会话中运行。不用在会话参数后面加个名字吧?
-
尝试添加会话名称——同样的问题。
-
对我来说,使用 org-mode v8.2.10 它可以按预期工作。
标签: python org-mode python-babel