GNU bug report logs -
#2421
23.0.90; python-mode: Indent commands behavior
Previous Next
Reported by: Milan Zamazal <pdm <at> zamazal.org>
Date: Sat, 21 Feb 2009 10:30:05 UTC
Severity: wishlist
Done: Fabián Ezequiel Gallina <fabian <at> anue.biz>
Bug is archived. No further changes may be made.
Full log
Message #42 received at 2421 <at> emacsbugs.donarmstrong.com (full text, mbox):
>>>>> "mr" == martin rudalics <rudalics <at> gmx.at> writes:
mr> I don't know whether `python-shift-left' and
mr> `python-shift-right' are of any use without a prefix argument.
>>
>> They are, I often use them after adding or removing a statement
>> in a code.
mr> I'm confused. Why don't you use TAB in that case?
Well, actually TAB runs indent-region. But I need simple shift instead.
Consider the following example:
def foo():
for i in range(3):
print i
print i + 1
print i + 2
I just pasted the print lines from a differently indented code and want
to fix the indentation by shifting the region of the print lines:
def foo():
for i in range(3):
print i
print i + 1
print i + 2
TAB can't do it:
def foo():
for i in range(3):
print i
print i + 1
print i + 2
Neither repeated pressing of C->:
def foo():
for i in range(3):
print i
print i + 1
print i + 2
To get what I want I have to press `C-8 C->'. I don't like it, I'd like
to call `M-x SOMETHING-shift-right' twice or
`M-2 M-x SOMETHING-shift-right'.
>> It would be more logical if they indented by (* python-indent
>> count).
mr> It might be even more logical to restrict ourselves to valid
mr> indentation points only.
Perhaps, but it's not that important.
mr> In any case we would need some feedback from `python-mode' users
mr> for such a change. The same goes for not deactivating the mark.
If people like the current behavior, configuration options may be
introduced.
mr> I have no idea what TRT is now when `transient-mark-mode' is
mr> off.
Neither do I.
Regards,
Milan Zamazal
This bug report was last modified 12 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.