From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 19:02:05 2011 Received: (at submit) by debbugs.gnu.org; 3 Jun 2011 23:02:05 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 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 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 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 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 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= MIME-Version: 1.0 Received: by 10.220.111.146 with SMTP id s18mr850335vcp.248.1307140888731; Fri, 03 Jun 2011 15:41:28 -0700 (PDT) Received: by 10.220.188.77 with HTTP; Fri, 3 Jun 2011 15:41:28 -0700 (PDT) Date: Fri, 3 Jun 2011 18:41:28 -0400 Message-ID: Subject: Incorrect Python Indentation From: Adrian Parker To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=0016e64c0b7258206d04a4d674d3 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-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --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-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 22:26:13 2011 Received: (at 8797) by debbugs.gnu.org; 4 Jun 2011 02:26:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSgZ3-00041W-1G for submit@debbugs.gnu.org; Fri, 03 Jun 2011 22:26:13 -0400 Received: from mail-vw0-f44.google.com ([209.85.212.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSgZ1-00041J-7x for 8797@debbugs.gnu.org; Fri, 03 Jun 2011 22:26:11 -0400 Received: by vws12 with SMTP id 12so1774955vws.3 for <8797@debbugs.gnu.org>; Fri, 03 Jun 2011 19:26:05 -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=dg1WG254r6r1NUm2YWlJV04+WqnUUgT3r066HLtkN2g=; b=n7iek25xydWmPyb3Uc3xgtg/VWFKMwR8cquCgurSyZ8z8aCxJJJV+3ElNp4ZEGxNbh 3XFYObypOqQtNVCzUyU9R36Aj4ZM3Y4OAt1mBW8W9DlLHrvLuIMUFfy/RnKrtHNmrlLS BSrkpuS9b4KQ/33VD0MqvWpBVV4fWoRswMtwc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HE8x8x+zMOj4cDMBTW3ilWmAz/Og8//sslIlAiCiiV0vFaa868WA526k+9+eVp4ghU MOmwTs6y1TFOpNzXWyEJSMHAuCoKwmn/SfCj8Ih7KoxM4d+dsudAWGoVjMaUoAMxDbcx H1rVBMSJHkOqZNKlZs6VTb+b8vrwY+J5erWOE= MIME-Version: 1.0 Received: by 10.220.111.146 with SMTP id s18mr895221vcp.248.1307154365690; Fri, 03 Jun 2011 19:26:05 -0700 (PDT) Received: by 10.220.188.77 with HTTP; Fri, 3 Jun 2011 19:26:05 -0700 (PDT) Date: Fri, 3 Jun 2011 22:26:05 -0400 Message-ID: Subject: Further context From: Adrian Parker To: 8797@debbugs.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: 8797 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) I should have given more context on turbofails' suggestion. Here is the diff output he provided for me: -- a/python.el +++ b/python.el @@ -678,7 +678,7 @@ Set `python-indent' locally to the value guessed." ;; level per bracketing level. (goto-char (1+ open-start)) (python-beginning-of-statement) - (+ (current-indentation) (* (car syntax) python-indent)))) + (+ (current-indentation) (* 2 (car syntax) python-indent)))) ;; Otherwise backslash-continued. (forward-line -1) (if (python-continuation-line-p) From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 18 17:39:32 2012 Received: (at 8797-done) by debbugs.gnu.org; 18 Jun 2012 21:39:32 +0000 Received: from localhost ([127.0.0.1]:47210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SgjfY-0006uA-Hb for submit@debbugs.gnu.org; Mon, 18 Jun 2012 17:39:32 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:52244) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SgjfW-0006u3-7e for 8797-done@debbugs.gnu.org; Mon, 18 Jun 2012 17:39:30 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SgjcJ-0003jh-Ob; Mon, 18 Jun 2012 17:36:11 -0400 From: Glenn Morris To: 8797-done@debbugs.gnu.org Subject: Re: bug#8797: Incorrect Python Indentation References: X-Spook: INS NSA EuroFed Soviet mailbomb brigand Belknap Jiang X-Ran: g87,YtrEmtZq=$;)-P`tFlwtw5IJvu]6A/D=m$ (Adrian Parker's message of "Fri, 3 Jun 2011 18:41:28 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 8797-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Version: 24.2 Thanks for the report. The Emacs trunk has a new python.el, and it seems your problem is fixed there. This should appear in Emacs 24.2. From unknown Wed Jun 25 09:09:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 17 Jul 2012 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator