I've followed these instructions with el-get
to try to install emacs-jedi (and the other needed packages), but no luck.
In my .emacs file, I've added the following lines:
;; .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." 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).
But after this, opening a Python file and trying Mx python-mode
yields an error:
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
Also, you don't need (package-initialize)
etc. for package.el setup. Everything is handled by 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:
(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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.