Re: [Python-mode] bug lp:328842, flexible-indentation of multiline assignements

2011-03-25 Thread skip

Andreas What about indenting it to the end of first element of previous
Andreas line?

That is precisely the problem.  That's what it does today, and if the lhs of
the assignment is a complex expression, the continuation is indented way too
far.  I would much prefer just to simply indent by the normal block indent.

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


Re: [Python-mode] highlight-indentation

2011-03-25 Thread Barry Warsaw
Hi Andreas,

I don't disagree with anything you wrote, and of course we're allowed to use
anything GPL'd.  I don't think even politeness mandates pre-approval in order
to *use* GPL code.

The let's be nice comment wasn't directed at you personally, or really
anybody here - I think we're all being nice, helpful, and polite, which to me
is one of the most important principles of FLOSS. :)

It also wasn't a comment on our use of GPL code.  It was related to our
bringing in a copy of someone else's file, which is already under their own
VCS, into our VCS.  Doing so could give the impression that we're the
authoritative copy of the file.  I wouldn't want to usurp someone else's
authority on that without their approval.

I hope that makes sense.

Cheers,
-Barry


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


Re: [Python-mode] bug lp:328842, flexible-indentation of multiline assignements

2011-03-25 Thread Barry Warsaw
On Mar 25, 2011, at 09:51 AM, Andreas Röhler wrote:

while considering the request valid, even if the current
non-indent is an option,

what's the recommendable indent?

Would not choose the block-indent step, rather signal
it's something different at stake.

What about indenting it to the end of first element of
previous line?

;;;
(longer, sequence, of_items,
that, needs, to_be, wrapped) = input_list

packed_entry = (long, sequence, of_items,
 that, needs, to_be, wrapped)
;;

I must be missing something because these two snippets get indented like this
for me, running r405:

-snip snip-
(longer, sequence, of_items,
 that, needs, to_be, wrapped) = input_list

packed_entry = (long, sequence, of_items,
that, needs, to_be, wrapped)
-snip snip-

which seems exactly right to me!

If you do introduce a variable to control this, please do retain the current
behavior as default.

Cheers,
-Barry


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


Re: [Python-mode] highlight-indentation

2011-03-25 Thread skip

I agree wholeheartedly with Barry's previous message on the indentation
topic.  Let me provide you with an analogy from a totally different realm.

If I take the dog out in the evening for a bathroom walk, I doubt that I
really need to tell my wife.  After all, it's part of my nightly routine to
walk Lily before coming up to bed.  There is no signed contract which
dictates that I tell her I'm walking the dog.  If Ellen happens to come
downstairs she will notice the absence of me, the dog and the leash, and not
jump to the conclusion that a neighbor has snuck in to walk the dog while
I've flown off to the Caribbean with some floozy (or gone hiking in the
Appalachians as a certain former politician from South Carolina did).
Still, as I head out the door, I let her know that Lily and I will be back
in a few minutes.  It's just the nice thing to do.

Skip

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


Re: [Python-mode] highlight-indentation

2011-03-25 Thread Andreas Röhler

Am 25.03.2011 16:08, schrieb Barry Warsaw:

Hi Andreas,

I don't disagree with anything you wrote, and of course we're allowed to use
anything GPL'd.  I don't think even politeness mandates pre-approval in order
to *use* GPL code.

The let's be nice comment wasn't directed at you personally, or really
anybody here - I think we're all being nice, helpful, and polite, which to me
is one of the most important principles of FLOSS. :)

It also wasn't a comment on our use of GPL code.  It was related to our
bringing in a copy of someone else's file, which is already under their own
VCS, into our VCS.  Doing so could give the impression that we're the
authoritative copy of the file.  I wouldn't want to usurp someone else's
authority on that without their approval.

I hope that makes sense.


Me too :-)

Somehow the VCS seems at stake now.
Okay, let's go on. Thanks and sorry should I have provoked too much writing.

Let's go into another turn.

Andreas





Cheers,
-Barry


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


Re: [Python-mode] bug lp:328842, flexible-indentation of multiline assignements

2011-03-25 Thread Andreas Röhler

Am 25.03.2011 16:54, schrieb Barry Warsaw:

On Mar 25, 2011, at 09:51 AM, Andreas Röhler wrote:


while considering the request valid, even if the current
non-indent is an option,

what's the recommendable indent?

Would not choose the block-indent step, rather signal
it's something different at stake.

What about indenting it to the end of first element of
previous line?

;;;
(longer, sequence, of_items,
that, needs, to_be, wrapped) = input_list

packed_entry = (long, sequence, of_items,
 that, needs, to_be, wrapped)
;;


I must be missing something because these two snippets get indented like this
for me, running r405:

-snip snip-
(longer, sequence, of_items,
  that, needs, to_be, wrapped) = input_list

packed_entry = (long, sequence, of_items,
 that, needs, to_be, wrapped)
-snip snip-

which seems exactly right to me!



Noticed.

As different styles are possible, think we can deliver what has been 
requested for.





If you do introduce a variable to control this, please do retain the current
behavior as default.


Okay.

Would help having an appropriate name for these indents.

What about calling the first an `left-inbound indent' --default will be 
1--, the second `right-inbound-indent' --default will be (1+ column of 
opening parentesis)--





Cheers,
-Barry


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


Re: [Python-mode] bug lp:328842, flexible-indentation of multiline assignements

2011-03-25 Thread Andreas Röhler

Am 25.03.2011 19:32, schrieb s...@pobox.com:

I find this indentation truly grating:

 self.last_abc_attr = self.last_xyz_attr = \
  self.last_abc_other = \
  self.last_xyz_other = None

Now, I can move self.last_xyz_attr to a continuation line, but though the
result is slightly different, it is, in my opinion, just as bad:

 self.last_abc_attr = \
self.last_xyz_attr = \
self.last_abc_other = \
self.last_xyz_other = None

What I would like to see is this (given a four-space block indent):

 self.last_abc_attr = \
 self.last_xyz_attr = \
 self.last_abc_other = \
 self.last_xyz_other = None

or, if the second expression remained on the first line:

 self.last_abc_attr = self.last_xyz_attr = \
 self.last_abc_other = \
 self.last_xyz_other = None

I don't care if this behavior is the default.  I just want to be able to
control it.  Currently, I have to manually format lines like this, and if
I'm not careful and reindent an entire function or file, then python-mode
undoes my work.

Skip



Hi Skip,

think that may be done.

As it's a different thing though than indenting inside tuples, lists etc.,
would you mind making a bug entry giving your last examples?

Andreas


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


Re: [Python-mode] bug lp:328842, flexible-indentation of multiline assignements

2011-03-25 Thread Barry Warsaw
On Mar 25, 2011, at 08:58 PM, Andreas Röhler wrote:

 -snip snip-
 (longer, sequence, of_items,
   that, needs, to_be, wrapped) = input_list

 packed_entry = (long, sequence, of_items,
  that, needs, to_be, wrapped)
 -snip snip-

What about calling the first an `left-inbound indent' --default will be 1--,
the second `right-inbound-indent' --default will be (1+ column of opening
parentesis)--

Those names seem pretty good to me.  I would make both of them default to
column_of_first_nonwhitespace_after_paren.

E.g.

(  one, two, three,
   four, five, six  ) = things

and

(
 one,
 two,
 three) = things

Cheers,
-Barry


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


Re: [Python-mode] bug lp:328842, flexible-indentation of multiline assignements

2011-03-25 Thread skip

Andreas As it's a different thing though than indenting inside tuples,
Andreas lists etc., would you mind making a bug entry giving your last
Andreas examples?

This bug is close enough:

https://bugs.launchpad.net/python-mode/+bug/629916

I just added a comment.

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