Reputation: 96294
I have been reading about the different Python packages available for Emacs for some time. However, I have never been able to find the official documentation of either package.
From what I understand, python-mode
seems is hosted at launchpad, but the repository does not have a wiki nor a document explaining the features, etc. On the other hand, python.el
comes with recent versions of Emacs, but I can't find a documentation walkthrough its features anywhere.
Also, do both of them support step-by-step debugging through ipdb
ipython
? Where can I find more information on this matter?
Upvotes: 2
Views: 980
Reputation: 4804
https://blueprints.launchpad.net/python-mode/+documentation
This offers some basic FAQs meanwhile.
python-mode.el is designed to support ipdb and all other debuggers right from the spot. Configuration as explained at top of python.el isn't needed, as these stuff is implemented. Most commands are self-explaining. Every command has a documentation string, which users will find useful for some features like py-expression
. Also the return values are reported there.
To get an overview which commands exist, the menu is a good starting point.
http://www.gnu.org/software/emacs/manual/html_node/emacs/Menu-Bar.html
python-mode.el lists commands alongside with its explanations in directory "doc".
Read the comments as suggested. Afterwards maybe employ outline-mode
or hs-minor-mode
to take a tour of the symbols.
Finally: M-x py- TAB, resp. M-x python- TAB lists the implemented commands. Once the name is known, call it's docu Ctrl-h f
Both modes should work with IPython/ipdb.
Seem several howto's at the net.
Maybe consult this
http://gremu.net/blog/2010/using-ipythons-debugger-pdb-replacement/
Please file a bug-report if you can't make it work.
As for with python-mode.el:
https://bugs.launchpad.net/python-mode
As for python.el : M-x report-emacs-bug RET
Upvotes: 2
Reputation: 3020
Comments following ;;; Commentary
is a good starting point, as @lunaryorn suggested. If you need setup read this part first.
But I think just start using it when your setup is done (for python.el, there is nothing to do if you use Emacs 24.3) is the best way to go through the features.
This is because Emacs is self-documenting editor. You can read all document about Emacs in Emacs. In Python buffer, use <f1> b
(or C-h
instead of <f1>
) to see a list of command you can use (this is the list of features). Each command is linked to the docstring of the command. You can also open a menu using "Ctrl + Right Click" to see a list of command you can use in the buffer. The document of python-mode
function, which can be opened by <f1> f python-mode RET
, may be another good starting point. If you want to see documentation of some keybind, type <f1> k KEY-BIND
. There are more useful help commands. See <f1> <f1>
for more info. These techniques are not specific to python-mode, so you can use them for python.el and python-mode.el.
Re ipdb: python.el (and I guess python-mode.el also) can do it. There is code snippet in ;;; Commentary
that you can use in Emacs configuration.
Upvotes: 3