From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#18843: Invalid block indentation in Python mode Date: Sun, 26 Oct 2014 15:18:08 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113f99344ed05b0506541534 X-Trace: ger.gmane.org 1414333161 17463 80.91.229.3 (26 Oct 2014 14:19:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2014 14:19:21 +0000 (UTC) To: 18843@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 26 15:19:14 2014 Return-path: Envelope-to: geb-bug-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 1XiOf2-0007Zn-3g for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Oct 2014 15:19:12 +0100 Original-Received: from localhost ([::1]:56844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOf1-00021V-M8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Oct 2014 10:19:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOex-00021H-AO for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:19:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiOes-0006Qa-63 for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:19:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOes-0006QW-33 for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XiOer-0003Wi-OQ for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Oct 2014 14:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18843 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141433309913485 (code B ref -1); Sun, 26 Oct 2014 14:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2014 14:18:19 +0000 Original-Received: from localhost ([127.0.0.1]:36062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiOeB-0003VR-3n for submit@debbugs.gnu.org; Sun, 26 Oct 2014 10:18:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59944) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiOe9-0003VB-1i for submit@debbugs.gnu.org; Sun, 26 Oct 2014 10:18:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiOe2-0006ME-QB for submit@debbugs.gnu.org; Sun, 26 Oct 2014 10:18:11 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:46696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOe2-0006MA-Nz for submit@debbugs.gnu.org; Sun, 26 Oct 2014 10:18:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOe1-0001t4-UH for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:18:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiOe1-0006Lu-0K for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:18:09 -0400 Original-Received: from mail-ig0-x236.google.com ([2607:f8b0:4001:c05::236]:59302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiOe0-0006Lq-Pm for bug-gnu-emacs@gnu.org; Sun, 26 Oct 2014 10:18:08 -0400 Original-Received: by mail-ig0-f182.google.com with SMTP id hn18so3896533igb.15 for ; Sun, 26 Oct 2014 07:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=9HIYj2gKpNhSyZHfMe3fBTzMSkbvLVeb9NYxdoxDE7k=; b=fTBCaYsfg/UnDTLmumZkgHLo/gXtZ2rGX3TlH/hCGEWKZZ394V+7JM9CENtgU+Vf5W XCyyGOX1sbhbhCA4YqB0w05QwhuUNWYOsySeAsQ3LK4rCVl/Ml0tRoZK5EyFxBMLrYLu ju/wVGtpbd3wKFFpr4hEvj+OMiKZqI8ov2+5fcXsYUo8bAkizfKmjobWPaaPefTyjkst mQRFAwNa0xFkZ/xkRPZzcSBgeQeHufGFDxzr8TPtr8lNdgr5wXtPjbPaFuJMCqoAjWOL Wja1I4VKxWgdpB9qkly9BAqMI6bSqqIGBARF+/zigXqqpqEx4K+tEOmb973REdA9OAhg JHzg== X-Received: by 10.107.8.213 with SMTP id h82mr881416ioi.84.1414333088057; Sun, 26 Oct 2014 07:18:08 -0700 (PDT) Original-Received: by 10.42.83.141 with HTTP; Sun, 26 Oct 2014 07:18:08 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95100 --001a113f99344ed05b0506541534 Content-Type: text/plain; charset=UTF-8 Block indentation in Python mode often gives silly results. For example, with 'emacs -q' create a Python buffer and type this: def foo (): try: pass except: pass Now 'C-x h TAB' gives something that is not valid at all: def foo (): try: pass except: pass Note that if you go to the 'except:' line and press 'TAB', 'except:' is indented back to its proper position. Further 'TAB's don't change this, i.e. mode understands that it cannot place 'except:' at any other indentation level. Emacs version (just compiled): GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9) of 2014-10-26 Paul --001a113f99344ed05b0506541534 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Block indentation in Python mode often gives sil= ly results. For example, with 'emacs -q' create a Python buffer and= type this:

def foo ():
=C2=A0=C2=A0=C2=A0 try:
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pass
=C2=A0=C2=A0=C2=A0 except:
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pass

Now 'C-x h TAB&#= 39; gives something that is not valid at all:

def foo ():
=C2=A0= =C2=A0=C2=A0 try:
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pass
exc= ept:
=C2=A0=C2=A0=C2=A0 pass

Note that if you go to th= e 'except:' line and press 'TAB', 'except:' is inde= nted back to its proper position. Further 'TAB's don't change t= his, i.e. mode understands that it cannot place 'except:' at any ot= her indentation level.

Emacs version (just compiled):
= GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9) of 2014= -10-26

Paul
--001a113f99344ed05b0506541534--