GNU bug report logs - #19691
24.4; python.el: indentation RFE

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Mon, 26 Jan 2015 14:26:03 UTC

Severity: wishlist

Tags: notabug, patch

Fixed in version 24.4

Done: fgallina <at> gnu.org (Fabián Ezequiel Gallina)

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: galli.87 <at> gmail.com
Subject: 24.4; python.el: indentation RFE
Date: Mon, 26 Jan 2015 11:25:18 -0300
When you're in a blank line and press Enter, IMHO it would be better if
python.el kept the cursor column position, instead of restoring the last
non-blank line indentation level.

For example, say the cursor is X:

def f():
    pass
X

When I press Enter most often I don't want to get:

def f():
    pass

    X

Instead, I think a more sensible default behaviour would be:

def f():
    pass

X

That is, to keep the cursor vertical position. This is consistent with
the criterion of auto-indenting up to the indentation of last (both
blank or non-blank) line, except for the technicality that a blank last
line is not really indented... although you still have a point position
there to infer desired indentation for the new line.

Maybe this should be made a customizable option.

What do you think? I'll try to submit a patch later today.




This bug report was last modified 10 years and 107 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.