py-compute-indentation wrong at EOL

Bug #858043 reported by Georg Brandl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Take this code:

if maxdepth == 0 or depth < maxdepth:
           item += build_toc(sectionnode, depth+1)

Note that the second line is not indented correctly, which I'd like to fix. Previously I could place the point anywhere in the line and press TAB to reindent. Now point has to be on or before the "i" in "item".

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 858043] [NEW] TAB only works within indentation

Am 24.09.2011 08:37, schrieb Georg Brandl:
> Public bug reported:
>
> Take this code:
>
> if maxdepth == 0 or depth< maxdepth:
> item += build_toc(sectionnode, depth+1)
>
> Note that the second line is not indented correctly, which I'd like to
> fix. Previously I could place the point anywhere in the line and press
> TAB to reindent. Now point has to be on or before the "i" in "item".
>
> ** Affects: python-mode
> Importance: Undecided
> Status: New
>

Hi Georg,

can't reproduce, neither with 23 nor 24 Emacs.
Indents nicely to 4 from every position except end-of-line.

However, when going to the end of second line, py-compute-indentation
yields a wrong 11 - which is another bug.

Can you reproduce the latter and make a report if yes?

thanks,

Andreas

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: TAB only works within indentation

Hi,

I'll change the title of this report pointing then to the bug detected from your example.
Fix is done and will take your example for tests,

thanks,

Andreas

summary: - TAB only works within indentation
+ py-compute-indent wrong at EOL
Changed in python-mode:
importance: Undecided → Medium
status: New → In Progress
milestone: none → 6.0.3
Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: py-compute-indentatian wrong at EOL

flagging it 'committed'.

Please re-open and send M-y report-emacs-bug, if bug persists,

cheers,

Andreas

summary: - py-compute-indent wrong at EOL
+ py-compute-indentatian wrong at EOL
Changed in python-mode:
status: In Progress → Fix Committed
summary: - py-compute-indentatian wrong at EOL
+ py-compute-indentation wrong at EOL
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.