【发布时间】:2013-10-30 15:54:53
【问题描述】:
使用 babel 和 org-mode,我正在尝试获取以下 C 代码的输出:
#+begin_src C :includes <stdio.h> :results output verbatim :exports both
puts("[1] 2 3 3");
#+end_src
不幸的是,在这个块上点击 C-cC-c 只会产生:
#+RESULTS:
: [1]
似乎尽管我使用了:results verbatim,但输出以某种方式被解释,[1] 之后的所有内容都被忽略了。 我想知道如何配置 org-babel 以便上面的结果包含完整的输出,即我期望:
#+RESULTS:
: [1] 2 3 3
请注意,如果我的输出不是以[.*] 开头,它会按我的预期显示:
#+begin_src C :includes <stdio.h> :results outputs verbatim :exports both
puts("foo");
puts("[1] 2 3 3");
#+end_src
#+RESULTS:
: foo
: [1] 2 3 3
我使用的是 Org 模式版本 8.2 (8.2-6-gd745cd-elpa)。
【问题讨论】: