Re: [Bug 873372] [NEW] Comment indented incorrectly after inline comment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Bug 873372] [NEW] Comment indented incorrectly after inline comment

Andreas Röhler-2
Am 13.10.2011 16:37, schrieb Barry Warsaw:

> On Oct 13, 2011, at 02:18 PM, Ryan Kaskel wrote:
>
>> Another little comment bug:
>>
>> ---------------------
>> foo = True # the next line is indented incorrectly
>>             # to here
>> ----------------------
>>
>> I think it should line up with 'f' in 'foo'.
>
> I'm not sure I agree entirely.  I tend to avoid these types of comments, but I
> think this one is worth a discussion on the mailing list.
>

so cc to it.

I'm in favor of the present behavior BTW.

However agree, there are two reasonable positions of a following indent.

Would support a request that way:

when cursor is at the indented comment in second line, a dedent should
reach the column 0.

Agreed?




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

Re: [Bug 873372] [NEW] Comment indented incorrectly after inline comment

Barry Warsaw
On Oct 13, 2011, at 06:41 PM, Andreas Röhler wrote:

>Am 13.10.2011 16:37, schrieb Barry Warsaw:
>> On Oct 13, 2011, at 02:18 PM, Ryan Kaskel wrote:
>>
>>> Another little comment bug:
>>>
>>> ---------------------
>>> foo = True # the next line is indented incorrectly
>>>             # to here
>>> ----------------------
>>>
>>> I think it should line up with 'f' in 'foo'.
>>
>> I'm not sure I agree entirely.  I tend to avoid these types of comments, but I
>> think this one is worth a discussion on the mailing list.
>>
>
>so cc to it.
>
>I'm in favor of the present behavior BTW.
>
>However agree, there are two reasonable positions of a following indent.
>
>Would support a request that way:
>
>when cursor is at the indented comment in second line, a dedent should reach
>the column 0.
In this case, but in cases where there is leading indentation, a dedent would
reach that column.  Right?

>Agreed?

Seems reasonable to me.

-Barry


_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Bug 873372] [NEW] Comment indented incorrectly after inline comment

Andreas Röhler-2
Am 13.10.2011 19:32, schrieb Barry Warsaw:

> On Oct 13, 2011, at 06:41 PM, Andreas Röhler wrote:
>
>> Am 13.10.2011 16:37, schrieb Barry Warsaw:
>>> On Oct 13, 2011, at 02:18 PM, Ryan Kaskel wrote:
>>>
>>>> Another little comment bug:
>>>>
>>>> ---------------------
>>>> foo = True # the next line is indented incorrectly
>>>>              # to here
>>>> ----------------------
>>>>
>>>> I think it should line up with 'f' in 'foo'.
>>>
>>> I'm not sure I agree entirely.  I tend to avoid these types of comments, but I
>>> think this one is worth a discussion on the mailing list.
>>>
>>
>> so cc to it.
>>
>> I'm in favor of the present behavior BTW.
>>
>> However agree, there are two reasonable positions of a following indent.
>>
>> Would support a request that way:
>>
>> when cursor is at the indented comment in second line, a dedent should reach
>> the column 0.
>
> In this case, but in cases where there is leading indentation, a dedent would
> reach that column.  Right?

OK, that might line up that way possibly

call_this_function(
     foo=bar).another_function( # some comment
     # some more comment
         foo=bar)



>
>> Agreed?
>
> Seems reasonable to me.
>
> -Barry
>

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode