Subject: bug#8797: closed (Re: bug#8797: Incorrect Python Indentation)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 18 Jun 2012 21:40:01 +0000

Your bug report

#8797: Incorrect Python Indentation

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
8797: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8797
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#8797: Incorrect Python Indentation
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Mon, 18 Jun 2012 17:36:11 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

Subject: Incorrect Python Indentation
From: Adrian Parker <[email-masked]>
To: [email-masked]
Date: Fri, 3 Jun 2011 18:41:28 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

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