【发布时间】:2013-06-29 00:34:12
【问题描述】:
当我尝试在 emacs 中打开 python 文件时出现以下错误:
无法猜测 python 缩进偏移量,使用默认值:4
延迟错误:(搜索程序时出错:权限被拒绝, 蟒蛇)
我的假设是需要将 python 环境变量复制到 Emacs PATH 变量,因为我必须使用 bradleywright 的 path.el 脚本为 Mac OS X 做同样的事情,但现在我Windows 7 需要做同样的事情。我该怎么做?
init.el
(load "~/.emacs.d/path.el")
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)
(require 'jedi)
(setq jedi:server-command
(list "C:/Python33/python.exe" jedi:server-script))
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)
(global-auto-complete-mode t)
(require 'ido)
(ido-mode t)
(add-to-list 'load-path "~/.emacs.d/elpa/magit-1.2.0/magit.el")
(require 'magit)
(require 'linum)
(global-linum-mode 1)
【问题讨论】:
-
绝地武士似乎离线:看起来更像是一个损坏的 Python 安装。 Emacs 之外的 Python 可以工作吗?
-
@AndreasRöhler 是的,我安装了 python 3.3.2,如果我在命令提示符中键入“python”,python shell 可以工作,但是如果我在 emacs 中进入 eshell,python 命令将不起作用。
-
CONTRIBUTING.md:如果您在回声区域收到类似
deferred error : (error ...)的信息,则大多数情况下错误来自 Jedi(Python 库)。按照 [this instruction][traceback] 获取回溯,并查看错误来自何处。如果它来自 Jedi,请将错误报告发送到其 [issue tracker][jedi-issue]。 [疑难解答]:tkf.github.io/emacs-jedi/latest/#troubleshooting [版本信息]:tkf.github.io/emacs-jedi/latest/#jedi:show-version-info [回溯]:tkf.github.io/emacs-jedi/latest/#how-to-get-traceback -
你可能会错过epc:python-epc.readthedocs.org/en/latest
标签: python emacs elisp path-variables python-jedi