unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: A new major-mode for Python
@ 2011-02-17  3:58 Christoph
  2011-02-17 18:22 ` Fabian Ezequiel Gallina
  0 siblings, 1 reply; 15+ messages in thread
From: Christoph @ 2011-02-17  3:58 UTC (permalink / raw)
  To: monnier; +Cc: Chong Yidong, emacs-devel, galli.87

Stefan Monnier <monnier@iro.umontreal.ca> writes:

 > I'm not so much concerned about backward compatibility, really.  I just
 > would rather have a smoother transition.

I think the move can be done step by step and shouldn't take too long 
overall.

 > I'm not too concerned about features.  I just want the transition to be
 > done in meaningful chunks.  E.g. one commit can rip out the old
 > indentation and install your new one.  Another one could be "drop
 > bycicle because noone wants to repair the repairman".

[...]

 > I think we can work something out.  And if Christoph is OK with helping
 > along, this could go very smoothly.

I am OK with that.

Here is what I would propose for the next steps:

If Fabian is OK with the general approach described by you and Chong and
OK with signing the FSF papers, he should go ahead and do that. In the
meantime, we could polish Fabians implementation as hosted on github and
start thinking about the integration in steps.

By polish, I mean a) resolve issues the current implementation has (I 
have been using it for a couple of days and found a couple, especially 
on Windows) and b) implement the features that are in the Emacs' 
python.el but not in Fabians implementation and that we don't want to loose.

I am available in whatever capacity Fabian is comfortable, i.e. as a
tester/bug reporter or I can provide patches for improvements.

As for the integration with the current python.el, I think that some
cleanup is needed first. For example the pdbtrack implementation that
was done a couple of years ago pulled in all this unecessary code that
was never cleaned up. I would clean up this part right away. Then maybe
remove bicycle repair main support and other stuff that we decide is not
really required. I think, this will make integrating Fabians changes
easier.

Fabian, what do you think?

Christoph



^ permalink raw reply	[flat|nested] 15+ messages in thread
* A new major-mode for Python
@ 2011-02-15  8:05 Fabian Ezequiel Gallina
  2011-02-15 22:52 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Fabian Ezequiel Gallina @ 2011-02-15  8:05 UTC (permalink / raw)
  To: Emacs-Devel devel

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



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-03-28 23:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17  3:58 A new major-mode for Python 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
  -- strict thread matches above, loose matches on Subject: below --
2011-02-15  8:05 Fabian Ezequiel Gallina
2011-02-15 22:52 ` 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

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).