From: Fabian Ezequiel Gallina <galli.87@gmail.com>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: A new major-mode for Python
Date: Tue, 15 Feb 2011 05:05:59 -0300 [thread overview]
Message-ID: <AANLkTi=5fPd6gQbU9_cuMWT8nASCWMRDBYq1kTo8mvGW@mail.gmail.com> (raw)
Hello Emacs devs,
I know the status of GNU/Emacs python.el has been discussed several
times on this list and I know there were some hopes for a merge
between python-mode.el[0] and python.el that never happened (mainly
because of Copyright issues AFAIK).
The thing is that I work a lot with Python and Emacs but I
wasn't happy with any of the available Python major modes.
I liked some stuff from the default python.el and some other from
python-mode.el and because of this I have come up with a *new*
major-mode[1] for Python which is based on the things I like and need
on a daily basis.
Most of the code is written from scratch. There are some parts that
are inspired by Emacs' python.el but I *never* used any of code you'll
find on python-mode.el in order to avoid Copyright issues in the case
there is some interest into merging this to the trunk.
The mode itself it's pretty solid, It's what I've been using for
almost a year now. After fixing a couple of things here and there, I'm
quite happy with the results.
I know the code is *not* perfect. I tried to be as clean as possible
and to name things the best way I could, but I'm not an Elisp guru,
and probably some parts of it are ugly at best (I'd like to receive
some pointers when that kind of stuff happens, since the idea is to
learn a little bit more about best practices).
Here is the list of what it currently implements:
* Syntax highlighting
* Solid (auto)indentation support
* auto-detection of indentation levels for current file
* Triple quoted strings support (stolen without guilt from
GNU/Emacs' original python.el)
* Fancy variable assignment colorization
* Movement commands you’ll expect from a major-mode.
* Python shell integration (not only for Python 2 but also Python 3!)
* Python shell completion (Same as above!)
* Nice generic shell integration that could support virtually any
text based python shell
* PDB Tracking (it even supports ipdb!)
* Symbol completion that sucks because a running inferior shell
process and valid code in the current buffer are needed (Don’t
blame me, it’s like that in every python-mode I know). I don’t
use this thing a lot, I use ropemacs instead
* Eldoc support (this suffers the same drawbacks as the symbol
completion, but it’s the only sane way to do it from Elisp)
* add-log-current-defun support
* hideshow support
* outline support
* fill paragraph
Things that (perhaps) are good to add at some point:
* python-check
* ffap support (I never used it though)
* some skeletons (I never used them since I use yasnippet)
Things I don't think are necessary to be added:
* Bicycle Repair Man integration: since it is discontinued and
there are other really nice refactoring tools out there (like
rope which can be integrated via ropemacs).
Since I'd love to contribute this to Emacs I don't have any issues in
signing papers for Copyright assignment.
In the meanwhile you can find this major mode at github[1].
[0] http://launchpadlibrarian.net/61970301/python-mode.el
[1] http://github.com/fgallina/python.el
Any ideas or suggestions are appreciated,
--
Fabián E. Gallina
http://www.from-the-cloud.com
next reply other threads:[~2011-02-15 8:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 8:05 Fabian Ezequiel Gallina [this message]
2011-02-15 22:52 ` A new major-mode for Python Stefan Monnier
2011-02-16 1:44 ` Chong Yidong
2011-02-16 6:46 ` Fabian Ezequiel Gallina
2011-02-16 15:20 ` Stefan Monnier
2011-02-16 15:34 ` Chong Yidong
2011-02-16 14:23 ` Neal Becker
2011-02-17 18:12 ` Fabian Ezequiel Gallina
2011-02-17 4:04 ` m h
2011-02-17 18:36 ` Fabian Ezequiel Gallina
-- strict thread matches above, loose matches on Subject: below --
2011-02-17 3:58 Christoph
2011-02-17 18:22 ` Fabian Ezequiel Gallina
2011-02-18 0:31 ` Christoph
2011-03-28 22:55 ` Fabian Ezequiel Gallina
2011-03-28 23:21 ` Christoph Scholtes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=5fPd6gQbU9_cuMWT8nASCWMRDBYq1kTo8mvGW@mail.gmail.com' \
--to=galli.87@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).