上下文:我一直在为python使用ropemacs,并且已经安装并运行了pyemacs。我想开始用python编写emacs (我有一些用elisp编写emacs的经验)。我从hello world示例开始。
我已经用docs中的示例创建了~/.emacs.d/hello.py
from Pymacs import lisp
def hello_world():
lisp.insert("Hello from Python!")
hello_world.interaction = ''然后,我尝试在我的初始化文件中加载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) 发布于 2014-10-05 05:17:15
我参加聚会可能有点晚了,但原因是您应该确保在将模块添加到pymacs-load-path之后重新加载pymacs解释器,最简单的方法是杀死Pymacs buffer,然后它应该可以工作
https://stackoverflow.com/questions/12437126
复制相似问题