From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Parker Newsgroups: gmane.emacs.bugs Subject: bug#8797: Incorrect Python Indentation Date: Fri, 3 Jun 2011 18:41:28 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e64c0b7258206d04a4d674d3 X-Trace: dough.gmane.org 1307146693 11940 80.91.229.12 (4 Jun 2011 00:18:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2011 00:18:13 +0000 (UTC) To: 8797@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 04 02:18:09 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QSeZ1-0006Oo-Et for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jun 2011 02:18:03 +0200 Original-Received: from localhost ([::1]:45845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSeZ0-0004VM-2b for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jun 2011 20:18:02 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSdOT-0004BV-Ef for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2011 19:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSdOR-0005wr-Np for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2011 19:03:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSdOR-0005wn-Ai for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2011 19:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QSdOQ-0007y0-AQ; Fri, 03 Jun 2011 19:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Adrian Parker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jun 2011 23:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8797 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.130714212530550 (code B ref -1); Fri, 03 Jun 2011 23:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jun 2011 23:02:05 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSdNU-0007wg-Pp for submit@debbugs.gnu.org; Fri, 03 Jun 2011 19:02:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSd3l-0007TF-Lj for submit@debbugs.gnu.org; Fri, 03 Jun 2011 18:41:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSd3f-0002ue-9J for submit@debbugs.gnu.org; Fri, 03 Jun 2011 18:41:36 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:35684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSd3e-0002uW-W8 for submit@debbugs.gnu.org; Fri, 03 Jun 2011 18:41:35 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:49921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSd3d-00078p-9g for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2011 18:41:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSd3a-0002tx-Cl for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2011 18:41:33 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:34219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSd3a-0002td-3o for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2011 18:41:30 -0400 Original-Received: by vws4 with SMTP id 4so2230126vws.0 for ; Fri, 03 Jun 2011 15:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=zm87h/q3jxsnRA6AMy5MM3Grv9TlbZuV1WjIW5d96qc=; b=xy5+nYDXg9mCpHH89dvdwNDmwI9UbPEwFQP9XP3xJJ5d4P/vSszAyikpkw89m5NWP8 UKLjFcZFUsdtdlVydRpFz6ME40alr0HVqNEfxGX2xCSai8yNvhPtuEiyBP7a6kNQ0AA1 m7uX3CSMTlRDDEA1wcfEC8ay9HcWTcwaJ+mB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=p6PbAVC3qXhvo+H20ziLp6uZG5f+4NxCF5IzbW0Cocv6FFgR2dQo6OnHVRsT7dCTkO WPiLt0Lj3Rvk57pXHAo1OzKzCsMRKX2yCEu1LDP5TNS9i4pP4hIrGaKNHzFlbeY4DnaI dFJEhtvR40R/GE4NCo+sOVdCb4OlQB0onJq6I= Original-Received: by 10.220.111.146 with SMTP id s18mr850335vcp.248.1307140888731; Fri, 03 Jun 2011 15:41:28 -0700 (PDT) Original-Received: by 10.220.188.77 with HTTP; Fri, 3 Jun 2011 15:41:28 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 03 Jun 2011 19:02:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 03 Jun 2011 19:03:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Fri, 03 Jun 2011 19:04:52 -0400 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:46939 Archived-At: --0016e64c0b7258206d04a4d674d3 Content-Type: text/plain; charset=ISO-8859-1 Version: Emacs 23.3.1 Steps to reproduce: 1. Open a Python file 2. Starting in the first column type: def some_func( 3. Press ENTER key 4. Press TAB key Expected result: The cursor should be in column 9. Under the "Code lay-out" heading at http://www.python.org/dev/peps/pep-0008/ please see the suggestions regarding continuation lines (note: its a very new change). Actual result: The cursor is in column 5. turbofail in #emacs on Freenode suggested I edit my python.el and: Replace this line: (+ (current-indentation) (* (car syntax) python-indent)))) with this line: (+ (current-indentation) (* 2 (car syntax) python-indent)))) That fixed the issue using an older version of Emacs at work. Note: Sorry, I'd provide a patch but I'm on windows, and haven't diff or patch installed. Adrian Parker --0016e64c0b7258206d04a4d674d3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Version: Emacs 23.3.1

Steps to reproduce:
  1. Open a Python file
  2. Starting in the first column type: def = some_func(
  3. Press ENTER key
  4. Press TAB key
Expe= cted result:
The cursor should be in column 9. Under the "Code lay-out&q= uot; heading at=A0http://www.python.org/dev/peps/pep-0008/=A0please see the= suggestions regarding continuation lines (note: its a very new change).

Actual result:
The cursor is in column 5.


turbofail in #emacs on Freenode sugges= ted I edit my python.el and:

Replace this line:
(+ (current-indentation) (= * (car syntax) python-indent))))

with this line:
(+ (current-indentation) (* 2 (car syntax) python-indent))))

That fixed the issue using an older version of Emacs at= work.

Note:=A0Sorry, I'd provide a patch but = I'm on windows, and haven't diff or patch installed.


Adrian Parker
--0016e64c0b7258206d04a4d674d3--