py-block-at-point and other reporting functions

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

py-block-at-point and other reporting functions

Andreas Röhler-2
Hi,

some new functions are available:

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


Compound reports returning buffer-strings by
py-whats-at-point

Made
py-beginning-of-def-or-class (really "or")

Old behaviour is preserved with
py-beginning-of-def-or-class-if-arg


Enjoy!


Andreas Röhler

--
Mentioned python-mode.el branch is available at
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/files
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-block-at-point and other reporting functions

Barry Warsaw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 26, 2009, at 9:56 AM, Andreas Roehler wrote:

> some new functions are available:
>
> 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
>
>
> Compound reports returning buffer-strings by
> py-whats-at-point
>
> Made
> py-beginning-of-def-or-class (really "or")
>
> Old behaviour is preserved with
> py-beginning-of-def-or-class-if-arg

Hi Andreas,

I'm not really going to have time to review this code any time soon.  
Sorry, I'm swamped.  If nobody else has the time then I would say,  
let's use the following guidelines so that you aren't blocked (since  
you have the current momentum pumpkin :).

If you don't change existing default behavior, you're cool.

If you're fixing a bug, you're cool.

Let us know when you commit changes and I will 'bzr pull' the new  
version and try it in my day-to-day editing.  If there's a problem,  
I'll let ya know. :)

But... let's be sure we get your signature on a copyright assignment  
to the FSF, so everything's legally clean.  Sound okay?

Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSX50cHEjvBPtnXfVAQJ8KwP6Ai3vIvWlo4yM5iVNbfdB9pSqT0EBZgNp
JdfmU5aCYRLx18TEWuy8HgRJ+wgK9ExQskSf/Tg7EiOGR2950dOOBJ1+nv/mykEO
ZWwEet/AJN8ykFilSB4Jq3bwERKzVxh8yczqnOYrs13SwdSwEavlcQJ1B30TgTSd
8iy5w3aQwrE=
=zYKs
-----END PGP SIGNATURE-----
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-block-at-point and other reporting functions

Andreas Röhler-2
Barry Warsaw wrote:

> On Jan 26, 2009, at 9:56 AM, Andreas Roehler wrote:
>
>> some new functions are available:
>
>> 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
>
>
>> Compound reports returning buffer-strings by
>> py-whats-at-point
>
>> Made
>> py-beginning-of-def-or-class (really "or")
>
>> Old behaviour is preserved with
>> py-beginning-of-def-or-class-if-arg
>
> Hi Andreas,
>
> I'm not really going to have time to review this code any time soon.
> Sorry, I'm swamped.  If nobody else has the time then I would say, let's
> use the following guidelines so that you aren't blocked (since you have
> the current momentum pumpkin :).
>

Hi Barry,

thanks for answering. I'm aware of you situation concerning time.

> If you don't change existing default behavior, you're cool.

Always have that in mind. Until now there is one changing concerning

py-beginning-of-def-or-class really "or"

So far I see no other need and this one might revoked if causing divorce... :)
>
> If you're fixing a bug, you're cool.
>

OK, but even then: the assigment question... See below.
IMHO assignment blocks development to a large extent.

> Let us know when you commit changes and I will 'bzr pull' the new
> version and try it in my day-to-day editing.  If there's a problem, I'll
> let ya know. :)
>
> But... let's be sure we get your signature on a copyright assignment to
> the FSF,

Ahh, as told, I'm _not_ going to sign. Is XEmacs code assigned as such?
Reading the code and the history of python-mode.el I assume no one is  able to assign
 this code to FSF rightfully.

so everything's legally clean.

Does such a thing exist in this world?
There are no more dirty corners than in
lawyers and the courts houses.

What I can assure: that I have written the changes I sent you.

BTW in german we have a saying: "Don't awake the sleeping dogs."
That's just the thing, legalizing does. It's a never ending night-mare.

FSF seems running into.

Andreas Röhler

 Sound okay?


>
> Barry
>
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-block-at-point and other reporting functions

Barry Warsaw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 27, 2009, at 2:32 AM, Andreas Roehler wrote:

>> If you don't change existing default behavior, you're cool.
>
> Always have that in mind. Until now there is one changing concerning
>
> py-beginning-of-def-or-class really "or"
>
> So far I see no other need and this one might revoked if causing  
> divorce... :)

Sorry, remind me again about the change you want to make to this?

Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSYIA+3EjvBPtnXfVAQJLOQQAkazLTIfhf6vqlzdhh0ZQzKX4ectnQVQB
XIIbCKbZaXQBQYr3WvI81Z5wJWuGHK6pyHn2ctiuFqnpMbeeSUOW3Z+SJtG0xv54
q8er6XyHXsDFFh8LAPA4Sms7N0PwfWajWD2S/fXJatNRG+2UNgtb8g3u4mzljuTx
BtmhgMMjVzI=
=j67u
-----END PGP SIGNATURE-----
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-block-at-point and other reporting functions

Andreas Röhler-2
Barry Warsaw wrote:

> On Jan 27, 2009, at 2:32 AM, Andreas Roehler wrote:
>
>>> If you don't change existing default behavior, you're cool.
>
>> Always have that in mind. Until now there is one changing concerning
>
>> py-beginning-of-def-or-class really "or"
>
>> So far I see no other need and this one might revoked if causing
>> divorce... :)
>
> Sorry, remind me again about the change you want to make to this?
>
> Barry
>


Goal was: commands should

- speak for themselves
- need no docu reading
- be easily to put at a key or alias.

Therefor, if we have a compound command, which with an
option changes its behaviour, IMO its better to split
it into two or more at the user level.

Old function `py-beginning-of-def-or-class' is renamed to
`py-beginning-of-def-or-class-if-arg', now adressed by either

py-beginning-of-function,
py-beginning-of-class, or
py-beginning-of-def-or-class (really "or", i.e. stops at both)


So old `py-beginning-of-def-or-class' remains the
function with the guts and is called by the new
introduced.

In the last case (really "or") that way:

(py-beginning-of-def-or-class-if-arg 'either arg)

py-beginning-of-def-or-class-if-arg still exists as command,
you may simply change the key if you want to use it as before.

BTW: opened another account at lp. Thanks for introducing me to bazaar.

Maybe have a look at http://bazaar.launchpad.net/~a-roehler/s-x-emacs-werkstatt/

Andreas Röhler
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-block-at-point and other reporting functions

Barry Warsaw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 29, 2009, at 2:54 PM, Andreas Roehler wrote:

> Goal was: commands should
>
> - speak for themselves
> - need no docu reading
> - be easily to put at a key or alias.
>
> Therefor, if we have a compound command, which with an
> option changes its behaviour, IMO its better to split
> it into two or more at the user level.
>
> Old function `py-beginning-of-def-or-class' is renamed to
> `py-beginning-of-def-or-class-if-arg', now adressed by either
>
> py-beginning-of-function,
> py-beginning-of-class, or
> py-beginning-of-def-or-class (really "or", i.e. stops at both)
>
>
> So old `py-beginning-of-def-or-class' remains the
> function with the guts and is called by the new
> introduced.
>
> In the last case (really "or") that way:
>
> (py-beginning-of-def-or-class-if-arg 'either arg)
>
> py-beginning-of-def-or-class-if-arg still exists as command,
> you may simply change the key if you want to use it as before.

That actually sounds fine to me.

> BTW: opened another account at lp. Thanks for introducing me to  
> bazaar.
>
> Maybe have a look at http://bazaar.launchpad.net/~a-roehler/s-x-emacs-werkstatt/

Maybe this url: https://launchpad.net/s-x-emacs-werkstatt

Looks cool.  Hope you like bazaar!
Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSYcWH3EjvBPtnXfVAQIFcQP8DQ/sE5A8IBb2k1zAaSZD3urNurcTylgR
Zv2vpObfRwrmcp6clDBYOp0McHwL6sz2cerV5Q7IfDPMsxT8Be6jmNolmagazmc1
7HzdqMY9lGSGiwoi7qNFiMOSs8VVs/1Qd/R2bLKFkrF2rFNxbNps+qYiC48OopIg
XeieSzLf8Qs=
=ZsB/
-----END PGP SIGNATURE-----
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode