[Python-Dev] Any Emacs tips for core developers?
glyph at divmod.com
glyph at divmod.com
Mon Feb 4 18:12:21 CET 2008
To say I "use" emacs would be an understatement. I *live* in emacs.
On 04:32 pm, jflatow at northwestern.edu wrote:
>I recently upgraded to the emacs 22.1/python.el which I tried *really*
>hard to use, but eventually ended up installing python-mode again.
>There are a number of problems in the emacs lisp that I was able to
>get around, but eventually the bugginess overcame my will:
>*R, RE, and RET (i.e. the keystroke shift-r) were bound to commands in
>the major mode (meaning you couldn't type an R without triggering
>python-send-string). You can comment out this line in python.el to get
Personally, I have been using GNU Emacs's new python mode since I
discovered it, and I've never encountered any of the bugs you just
described. (Perhaps you are describing bugs that arise from trying to
use it with XEmacs?) I have, however, found that it is *less* buggy in
certain circumstances; it seems to indent parentheses correctly in more
circumstances, and it isn't confused by triple-quoted strings. It also
has functioning support for which-func-mode which python-mode.el doesn't
seem to (a hack which displays the current scope on the modeline, which
is very helpful for long classes: I can just glance down and see
"FooBarBaz.bozBuz()" rather than needing to hit "C-M-r ^class"
As always, YMMV.
Also, I use twisted-dev.el for all of my Python development. I don't
think I'll ever be able to go back to F9 doing anything but running
tests for the current buffer. Apparently there's a "ctypes-dev" based
on those hacks in the main Python repository which basically does the
same thing. (I'd also strongly recommend binding F5 to 'next-error'.
It makes hopping around in the error stack nice and easy.)
Finally, for you Ubuntu developers, I'm also using the the pre-release
XFT GNU emacs, which is very pretty. So far, despite stern and dire
warnings, it has had no stability issues:
Look for the "PPA" deb lines there, and you get a nicely prepackaged,
policy-compliant version of emacs with no need to build anything
(I've also got a personal collection of hacks that, if anyone likes
TextMate-style "snippets", I'll email you. It does stuff like turning
""" into """\n(indent)\n"""\n and "class " into "class (cursor
here):\n"""\n(indent)\n"""\n(indent)\n". I haven't cleaned it up for a
public release since a lot of people seem to think that automatically
inserting text is pretty obnoxious and I just don't have the energy for
More information about the Python-Dev