Comments (2)
I found that rope causes a lot of hanging problems too, I'll check if I can reproduce your behaviour and try to help you. As a workaround I would suggest you to ditch rope altogether and use https://github.com/tkf/emacs-jedi which is so much faster and reliable.
The reason why jedi is not included in emacs-for-python is that it has a weird installation procedure based on virtualenv and I should find a way to wrap and bundle it.
from emacs-for-python.
I decided to try jedi instead. Thanks for the tip.
I wrote this to make jedi use my project-specific virtualenv. Maybe it can be useful to someone else:
(defun project-directory (buffer-name)
(interactive)
(let ((git-dir (file-name-directory buffer-name)))
(while (and (not (file-exists-p (concat git-dir ".git")))
git-dir)
(setq git-dir
(if (equal git-dir "/")
nil
(file-name-directory (directory-file-name git-dir)))))
git-dir))
(defun project-name (buffer-name)
(let ((git-dir (project-directory buffer-name)))
(if git-dir
(file-name-nondirectory
(directory-file-name git-dir))
nil)))
(defun virtualenv-directory (buffer-name)
(let ((venv-dir (expand-file-name
(concat "~/.virtualenvs/" (project-name buffer-name)))))
(if (and venv-dir (file-exists-p venv-dir))
venv-dir
nil)))
(defun setup-jedi-server-args ()
(let ((venv-dir (virtualenv-directory buffer-file-name)))
(when venv-dir (set 'jedi:server-args (list "--virtual-env" venv-dir)))))
(setq jedi:setup-keys t)
(add-hook 'python-mode-hook 'setup-jedi-server-args)
(add-hook 'python-mode-hook 'jedi:setup)
from emacs-for-python.
Related Issues (20)
- Toggle block comment HOT 1
- Django Plugin from 24.3
- renaming variable is taking forever
- Cursor changes color after code completion
- Added a way to run multiple checkers. HOT 4
- Send a block to inferior python HOT 2
- Add a simple way to disable flymake. HOT 2
- Pylint checker not running
- How to remove the underscore line while editing? HOT 1
- How about replacing ropemacs with Jedi? HOT 1
- Draft code in eproject extension
- (epy-django-snippets) throws an error
- auto-indenting new function signatures to the right after pressing enter HOT 2
- ropemacs gets added to ac-sources every time rope is used
- cannot open epy-init.py
- web-mode incompatibility
- eldoc error: (void-variable comint-last-prompt-overlay) HOT 3
- Error:flyc/show-fly-error-at-point-pretty-soon
- Are you still working on this repo? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-for-python.