GNU bug report logs - #20560
24.5; I am not happy with the new Python mode indentation behaviour

Previous Next

Package: emacs;

Reported by: Fabrice Salvaire <fabrice.salvaire <at> orange.fr>

Date: Tue, 12 May 2015 15:44:02 UTC

Severity: wishlist

Tags: confirmed

Merged with 33979

Found in versions 24.5, 26.1

Full log


View this message in rfc822 format

From: Fabrice Salvaire <fabrice.salvaire <at> orange.fr>
To: 20560 <at> debbugs.gnu.org
Subject: bug#20560: 24.5; I am not happy with the new Python mode indentation behaviour
Date: Tue, 12 May 2015 12:13:07 +0200
Dear Emacs devs,

I noticed after an Emacs update the Python mode changed its indentation 
behaviour.

I checked my .emacs and .gnu-emacs-custion for settings that could 
interfere with the Python mode, but I found anything.

First it imposes a newer indentation style, the closing 
brace/bracket/parenthesis on multi-line constructs line up under the 
first character of the line that starts the multi-line construct:

my_list = [
____1, 2, 3,
____4, 5, 6,
]

while I have thousands lines of codes typed on Emacs where  the closing 
character is indented, e.g.:

my_list = [
____1, 2, 3,
____4, 5, 6,
____]

Moreover if you press enter in the following construct at the location 
marked by *  to add an empty line or to add codes after the if:

if foo:
____a = 1
*a = 2

then the line is automatically indented:

if foo:
____a = 1

____a = 2

Thus I have to fight continuously with the indentation and it will 
probably increase the indentation noise in the VCS.

I guess Python is not the most easier language to indent automatically, 
but I would prefer manual indentation than to fight against my editor.

Sincerely yours,

Fabrice





This bug report was last modified 4 years and 272 days ago.

Previous Next


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