我安装了Pymacs,绳索,绳索模式,绳索,当我pymacs-terminate-services
偶然执行时,我无法保存修改后的缓冲区.它首先问我 - The Pymacs helper died. Restart it? (yes or no)
.如果我回答"是",它就扔了 - Debugger entered--Lisp error: (error "There is no Pymacs helper!")
.如果我回答"否",它会抛出:
Debugger entered--Lisp error: (error "Python: Traceback (most recent call last):
File \"/usr/local/lib/python2.7/dist-packages/Pymacs.py\", line 258, in loop
value = eval(text)
File \"<string>\", line 1, in <module>
IndexError: list index out of range
")
Run Code Online (Sandbox Code Playgroud)
我设法通过执行pymacs-load
,加载os
模块和对Pymacs帮助重启问题回答是来解决.保存缓冲区,但每次保存文件时我都开始收到另一个错误:
Debugger entered--Lisp error: (error "Python: Traceback (most recent call last):
File \"/usr/local/lib/python2.7/dist-packages/Pymacs.py\", line 258, in loop
value = …
Run Code Online (Sandbox Code Playgroud) 有没有什么可以使GNU Emacs 23.2与Python 3一起运行?
如何在Emacs中使用Python 3进行开发的理想环境如何?
有没有关于在Python 3中使用ropemacs的文档?
我应该将Python 3的site-packages
目录添加到python路径吗?
将按照这里的说明(对于python-mode.el)或设置python-python-command
为python3 for python.el影响pymacs或ropemacs?
编辑:来自GNU Emacs 23.2的python.el(由Dave Love撰写):
;; Fixme: This doesn't support (the nascent) Python 3
Run Code Online (Sandbox Code Playgroud)
python-mode.el如何支持它?
是否有相当于python的粘液?
例如,如果我将光标定位在foo()上并执行M-.(跳转到定义)我想看看函数foo的源定义
无论foo是否存在,这都应该有效
1)本地项目目录
2)在一些〜/ .virtualenvs/bar/lib/site-packages中
3)在其他一些python-path中
4)虚拟环境正在使用中(即,它应该在我当前的virtualenv中查看)
pymacs/ropemacs组合是否可以执行此操作?
我正在尝试为python开发设置emacs.
根据我的阅读,建议使用python-mode.el而不是Emacs 22.3中的默认python.el.所以我踏上了新的冒险之旅.
根据我的理解,python-mode有几个依赖项,所以我需要安装rope,ropemode和ropemacs.然后,我需要安装pymacs.
问:这是对的吗?
这是我的新.emacs现在:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t)
'(tab-width 4))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should …
Run Code Online (Sandbox Code Playgroud) 我用Pymacs加载ropemacs和绳索与以下行我的.emacs描述文件在这里.
(autoload 'pymacs-load "pymacs" nil t)
(pymacs-load "ropemacs" "rope-")
Run Code Online (Sandbox Code Playgroud)
然而,由于加载Ropemacs需要一段时间,因此它显着减慢了Emacs的启动速度.
我尝试了以下行,但每次打开Python文件时都会加载Ropemacs:
(add-hook 'python-mode-hook (lambda () (pymacs-load "ropemacs" "rope-")))
Run Code Online (Sandbox Code Playgroud)
有没有办法pymacs-load
在打开Python文件时执行操作,但只有在尚未加载ropemacs和rope时?
我想在emacs中使用python进行自动完成和重构.
我认为我需要绳索才能做到这一点.要使用emacs执行此操作,我需要ropemacs.Ropmacs依赖于pymacs.
Pymacs很难安装......或者至少说明书对我来说并不清楚.
我需要做两件事吗?安装pymacs,然后安装一个告诉emacs与pymacs交谈的文件?我已经非常轻松地安装了绳索和绳索
pip install rope ropemacs
这是我做的:
pip install -e "git+https://github.com/pinard/Pymacs.git#egg=Pymacs"
Run Code Online (Sandbox Code Playgroud)
根据PIP,这在mac os x mountain lion上安装正常.
但我有一种感觉,我没有完成 - 或者是我?
如何测试pymacs,绳索和绳索是否全部工作?
我尝试使用emacs制作PythonIDE,如本文http://www.enigmacurry.com/2009/01/21/autocompleteel-python-code-completion-in-emacs/但是emacs说我"自动完成模式未启用".可以使用emacs进行python编码吗?