help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python setup ?


From: Andreas Röhler
Subject: Re: python setup ?
Date: Thu, 30 Apr 2009 09:25:40 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

Xavier Maillard wrote:
> Hi,
>
>    Richard Riley wrote:
>
>    >> The python-mode used is 5.1.0.
>
>    I've changed python-mode a little bit.
>    Purpose was to make movements a little bit easier,
>    more predictible.
>
> Easier, how easier ? What is so difficult with the default
> bindings ? (serious questions).
>   

Hi Xavier,

well, what means "easier"?

Our personal notion about whats best or fittest not
always is acknowledged by others obviously. Tastes
differ. From that I mean its better not just to look
for the one-and-all solution, but to offer flavors of
modes, so people have the choice. Thats already done
with perl-mode and cperl-mode for example. Nonetheless,
the one-and-all idea seems deep-rooted not just in
religion.

With python-mode.el, people may have good reasons, to
use it as it is - and me to leave it as it is.  Thats
fine with bazaar and other DVCs, we can do that. My
branch doesn't hamper the origin and any further branch
will not. Its just freedom to try and see.

Branch orginated from some request, to close forms more
definitely, more specific. Whilst python looks easy and
indeed is, editing it poses some specific difficulties
resulting from special meaning of whitespace.

Python-mode solved this by offering some repeats: if
you are not at the right indentation, just try the next
one - outer or inner.

Thats OK, thats a possible approach. Here the request
came from a user, who must care to save keystrokes.

Thus I wrote commands precisely closing function or
class, resp. last block. Block conceived as the
smollest hierarchical unit - themselves if no hierarchy
exists.

Too I had some other things in mind: reduction of
complexity, generalisation. Something remains to be
done.

Some reporting facilities have been introduced and
shall be still.

Here new functions as `bzr log' displays it:

`py-next-statement' and `py-previous-statement' set cursor at first char
on line instead of beginning of line
 
py-forward-block, py-backward-block

  py-beginning-of-def-or-class
  py-class-at-point
  py-function-at-point
  py-beginning-of-function
  py-beginning-of-class
  py-end-of-function
  py-end-of-class
  py-end-of-def-or-class
  py-line-at-point
  py-block-at-point
  py-beginning-of-block
  py-end-of-block
 
  py-whats-at-point
 
  py-beginning-of-def-or-class (really "or")
 
  py-beginning-of-def-or-class-if-arg

########

So far

Andreas Röhler

--
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/
https://code.launchpad.net/s-x-emacs-werkstatt/

>    BTW have a look at pydb from Rocky Bernstein, if not done already.
>
> What is it useful for ?
>
>       Xavier
>   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]