The primary purpose of this package is to integrate the Emacs24 builtin python-mode package with jedi for ease of developing Python code with Emacs.
When working within a virtualenv, pungi:setup-jedi
configures the
python
modes' python-shell-virtualenv-path
to be the current
virtualenv, and when a buildout is detected via the presence of an
omelette
part, sets python-shell-extra-pythonpaths
, which
enables jedi commands jedi:complete
, jedi:goto-definition
and
jedi:doc
operate on the correct source files.
pungi
was originally inspired by the following gist:
https://gist.github.com/nyergler/6100112
For the curious, the name pungi
is the Indian name for a snake charmer
.
Ensure that the name "emacs" in your shell points to the Emacs executable. i.e On $PATH or aliased.
This package can be installed via the list-packages
interface in Emacs.
If not using ELPA (i.e list-packages), then add the following to you init.el/.emacs:
(add-to-list 'load-path 'path-to-this-file)
Using ELPA, i.e when pungi
is installed via list-packages
:
In all cases, call pungi:setup-jedi
within a python-mode-hook
Manual testing:
When visiting a python buffer, move the cursor over a symbol and check
that invoking M-x jedi:goto-definition
(Usually bound to the
key M-.
) opens a new buffer showing the source of that python
symbol.