我试图将src代码提取到纠结的文件中
#+name fast_mul.py
#+begin_src ipython :session sicp :results output :tangle ../pySrc/fast_mul.py :exports code
def fast_mul(a, b):
if b == 1: return a
else:
if even(b):
return 2 * fast_mul(a, b//2)
if odd(b): return a + 2 * fast_mul(a, b//2)
def even(n):
return n % 2 == 0
def odd(n):
return n % 2 == 1
print(fast_mul(3, 7))
#+end_src
但收到错误报告
org-babel-tangle-single-block: Wrong type argument: stringp, nil
或者尝试
#+begin_src emacs-lisp :session sicp :lexical t :tangle yes
(print 'test)
#+end_src
发生相同的错误。
出什么问题了?