From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florian Weimer Newsgroups: gmane.emacs.help Subject: python-mode's broken indentation behavior Date: Sun, 28 Jun 2015 21:47:03 +0200 Message-ID: <87y4j37gzs.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1435538024 32418 80.91.229.3 (29 Jun 2015 00:33:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2015 00:33:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 29 02:33:37 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9N0y-0001xJ-79 for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 02:33:36 +0200 Original-Received: from localhost ([::1]:40183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9N0x-0007yW-OT for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 20:33:35 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-2.dfn.de!news.dfn.de!news.uni-stuttgart.de!news.enyo.de!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 66 Original-X-Trace: news.enyo.de 1435520823 28776 192.168.18.20 (28 Jun 2015 19:47:03 GMT) Original-X-Complaints-To: news@enyo.de Cancel-Lock: sha1:JC6/lhHFRBid9bG3sq0XIXRn8Rg= Original-Xref: usenet.stanford.edu gnu.emacs.help:212979 X-Mailman-Approved-At: Sun, 28 Jun 2015 20:33:25 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105268 Archived-At: Indentation in python-mode has been fairly broken for me, I believe since Emacs 24. The electric colon makes this especially annoying. In the following, _ marks the position of point. If I press RET here: def foo(x): if x: return 2 else: raise Foo_ I get this, which is correct. def foo(x): if x: return 2 else: raise Foo _ Continuing typing: def foo(x): if x: return 2 else: raise Foo for i in range(0, 10)_ So far, so good. Now press ‘:’: def foo(x): if x: return 2 else: raise Foo for i in range(0, 10):_ Going from: def foo(x): if x: x() else: y() for i in range(0, 10)_ to: def foo(x): if x: x() else: y() for i in range(0, 10):_ is equally unhelpful. For me, this makes editing Python scripts with Emacs a fairly painful experience. Surely this is a known issue because it has been around for so long. Is this the behavior the python-mode maintainers prefer? I find this hard to believe.