all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adrian Parker <adrian.l.parker@gmail.com>
To: 8797@debbugs.gnu.org
Subject: bug#8797: Incorrect Python Indentation
Date: Fri, 3 Jun 2011 18:41:28 -0400	[thread overview]
Message-ID: <BANLkTikcYt0wRxeo_NOrxR1u5mehHZ9g+Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1243 bytes --]

             reply	other threads:[~2011-06-03 22:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 22:41 Adrian Parker [this message]
2011-06-04  2:26 ` bug#8797: Further context Adrian Parker
2012-06-18 21:36 ` bug#8797: Incorrect Python Indentation Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikcYt0wRxeo_NOrxR1u5mehHZ9g+Q@mail.gmail.com \
    --to=adrian.l.parker@gmail.com \
    --cc=8797@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.