[英]Package load problems with el-get installed emacs-jedi
I've followed these instructions with el-get
to try to install emacs-jedi (and the other needed packages), but no luck. 我已经按照el-get
这些说明尝试安装emacs-jedi (以及其他所需的软件包),但没有运气。
In my .emacs file, I've added the following lines: 在我的.emacs文件中,我添加了以下行:
;; .emacs
;; Load package repositories
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/package/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
;; Install / load / require el-get and
;; packages managed by it.
(add-to-list 'load-path "~/.emacs.d/el-get/")
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil t)
(url-retrieve
"https://raw.github.com/dimitri/el-get/master/el-get-install.el"
(lambda (s)
(end-of-buffer)
(eval-print-last-sexp))))
;; Initialize any loaded packages
(package-initialize)
;; stuff to set font, theme, etc.
;; ...
;; Include jedi for Python mode.
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)
;; rest of file ...
At first, I was seeing the issue "cannot open load file jedi/jedi." 起初,我看到问题“无法打开加载文件jedi / jedi”。 This seemed to go away when I added "~/.emacs.d/el-get/" to the load path ( el-get
seems to only place "~/.emacs.d/el-get/el-get" on the load path when installing). 当我将“〜/ .emacs.d / el-get /”添加到加载路径时,这似乎消失了( el-get
似乎只放置了“〜/ .emacs.d / el-get / el-get”)安装时的加载路径)。
But after this, opening a Python file and trying Mx python-mode
yields an error: 但在此之后,打开Python文件并尝试Mx python-mode
产生错误:
Symbol's function definition is void: jedi:setup
I'm happy to do any more debugging or to provide more messages or output -- but after Googling for these error messages for a long time, I have been unable to find anything to try that seemed productive. 我很乐意做更多的调试或提供更多的消息或输出 - 但在谷歌搜索这些错误消息很长一段时间后,我一直无法找到任何尝试,似乎有效。
You are missing (el-get 'sync)
which is mentioned in https://github.com/dimitri/el-get#basic-setup 您丢失了(el-get 'sync)
,这在https://github.com/dimitri/el-get#basic-setup中提到
Also, you don't need (package-initialize)
etc. for package.el setup. 此外,您不需要(package-initialize)
等package.el设置。 Everything is handled by el-get. 一切都由el-get处理。 It is a good idea to not mix two package managers. 不要混合两个包管理器是个好主意。
Here is a minimal Emacs setup to use Jedi via el-get: 这是一个通过el-get使用Jedi的最小Emacs设置:
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
;; Uncomment this, if you are in hurry
;; (setq el-get-install-skip-emacswiki-recipes nil)
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
(goto-char (point-max))
(eval-print-last-sexp)))
(el-get 'sync)
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)
;; Type:
;; - M-x el-get-install RET jedi RET
;; - M-x jedi:install-server RET
;; Then open any Python file.
Update: 更新:
I added it in the manual 我在手册中添加了它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.