py-indent-line behavior from 6.1.1
Bug #1375122 reported by
Jonathan C. Dodd
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Andreas Roehler |
Bug Description
Consider this sequence of actions:
1. Type "if sum(0, 1,"
2. M-x newline
3. TAB
Upon hitting TAB, version 6.1.1 and older first placed cursor to the outermost indentation and then cycled through other possible indentations (0 and above in steps of 4). Versions 6.1.2 and 6.1.3 omit the correct indentation guess and start cycling immediately.
I have looked through changelogs of the two newer versions and found no explicitly stated motivation for changing the behavior. Is it possible to return the old one?
Changed in python-mode: | |
status: | New → Opinion |
Changed in python-mode: | |
status: | Opinion → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Andreas Roehler (a-roehler) |
milestone: | none → 6.2.1 |
Changed in python-mode: | |
status: | Confirmed → Fix Committed |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
On 29.09.2014 07:49, Jonathan C. Dodd wrote:
> Public bug reported:
>
> Consider this sequence of actions:
>
> 1. Type "if sum(0, 1,"
> 2. M-x newline
> 3. TAB
>
> Upon hitting TAB, version 6.1.1 and older first placed cursor to the
> outermost indentation and then cycled through other possible
> indentations (0 and above in steps of 4). Versions 6.1.2 and 6.1.3 omit
> the correct indentation guess and start cycling immediately.
>
> I have looked through changelogs of the two newer versions and found no
> explicitly stated motivation for changing the behavior. Is it possible
> to return the old one?
>
The workflow here would be to call newline-and-indent, commonly C-j
With TAB python-mode increments one step until outmost indent.
From outmost first TAB does nothing - thus reminding user pos is outmost already.
A second TAB would jump to col 0.
From outmost stepping down one level <backspace> seems convenient.