2
上下文:我一直在使用ropemacs for python,并设置和工作pyemacs。我想开始在Python中编程emacs(我有一些在elisp中编程emacs的经验)。我开始与你好世界样本。
我创建〜/ .emacs.d/hello.py与样品从docs:获取你好世界在pymacs工作
from Pymacs import lisp
def hello_world():
lisp.insert("Hello from Python!")
hello_world.interaction = ''
我则想在我的init文件加载hello.py:
(eval-after-load "pymacs"
'(add-to-list 'pymacs-load-path "~/.emacs.d/"))
(pymacs-load "hello") ;;this line fails
(require 'hello)
我收到以下错误。我究竟做错了什么?
Debugger entered--Lisp error: (error "Pymacs loading hello...failed")
signal(error ("Pymacs loading hello...failed"))
pymacs-report-error("Pymacs loading %s...failed" "hello")
(cond (lisp-code (let ((result (eval lisp-code))) (message "Pymacs loading %$
(let ((lisp-code (pymacs-call "pymacs_load_helper" module prefix))) (cond (l$
pymacs-load("hello")
eval((pymacs-load "hello") nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
您的'hello_world.interaction ='''行是缩进,而在文档中它不是。 – tkf
嗨tkf这是一个错字。修正了缩进 – Raghu