Re: [Python-mode] python setup ?

2009-04-30 Thread Andreas Röhler
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
   

___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode


Re: [Python-mode] python setup ?

2009-04-30 Thread Barry Warsaw

On Apr 30, 2009, at 3:25 AM, Andreas Röhler wrote:


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.


This is true, and experimentation a good thing in the short term.  In  
the long term though, a proliferation of branches just confuses people  
because no one's sure which is the official branch.  Our lives are  
more difficult too because of the python-mode.el/python.el split.


So I encourage you to experiment and get user feedback.  Old-timers  
(and remember, python-mode.el's been in widespread use for 15 years)  
will be wedded to their muscle memory, but if you introduce a user- 
visible change that people like, they can be made configurable with  
defaults providing the old behavior.  Then it will be possible to  
merge your changes back into the official branch.  If you modularize  
your changes, then the less controversial ones can get merged in sooner.


-Barry



PGP.sig
Description: This is a digitally signed message part
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode


[Python-mode] pdbtrack

2009-04-30 Thread Andreas Roehler

Hi Barry,

I'll send you two screenshots offlist.  Please feel
free to forward them to interested persons, just didn't
want to publish my path at the list.

20090428_pdbtrack3.png displays pdbtrack opened second
windows, cursor displayed at line 4 import

With 20090428_pdbtrack4.png you see  shell-output
from line 8, but cursor in second window still is at line 4.

Always get Traceback cue not found

Cause seems var `py-pdbtrack-stack-entry-regexp'.

That doesn't happen, if pdb.set_trace() is inside the
python-file.

Did someone else remark this?

Andreas
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode