From: rjd <ryan.dixon@etas.com>
To: help-gnu-emacs@gnu.org
Subject: Re: pYthon indentation
Date: Thu, 22 Oct 2015 16:04:40 +0000 (UTC) [thread overview]
Message-ID: <loom.20151022T180021-191@post.gmane.org> (raw)
In-Reply-To: alpine.NEB.2.11.1510221147100.3857@panix1.panix.com
Jude DaShiell <jdashiel <at> panix.com> writes:
>
> I don't know much python yet but have used python-mode to code in
> python2. When I write something for python a.k.a. python3 though the
> indents are each 2 spaces. A tab character doesn't work by itself. For
> that reason python-mode may need reconfiguration to tell it each indent
> is two spaces. I don't know that using the tab key with python-mode can
> be caused to produce two spaced indents but if so that should solve your
> problem.
>
I never use tab characters in python-mode. I have it set so that TAB will
really insert 4 spaces since those are our coding guidelines. This must be
some sort of bug (I have posted at stackoverflow too:
http://stackoverflow.com/questions/33283860/emacs-24-5-python-mode-stock-version-vs-6-2-1
since I was having a hard time posting on gmane).
Thank you for your response.
When I load python-mode from 6.2.1 indentation works, but 6.2.1 IMO contains
regressions that I just do not want. I was thinking about just hacking my
own indentation function - easy when you are indenting from col 0, but there
is complexity when dealing with non col 0 and auto indentation.
Here is my snippet of .emacs:
(c-set-offset 'inline-open '0) ; This one because of indentation INSIDE
class def
(setq-default indent-tabs-mode nil)
(setq-default tab-width 3)
(setq indent-line-function 'insert-tab)
(setq-default c-basic-offset 3)
(setq-default sh-basic-offset 4)
(setq-default sh-indentation 4)
(setq-default python-indent-offset 4)
(setq-default c-default-style "linux")
(setq c-default-style
'((java-mode . "java")
(awk-mode . "awk")
(other . "linux")))
next prev parent reply other threads:[~2015-10-22 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 14:24 pYthon indentation rjd
2015-10-22 15:50 ` Jude DaShiell
2015-10-22 16:04 ` rjd [this message]
2015-10-22 16:20 ` Nick Dokos
2015-10-26 11:52 ` rjd
2015-10-22 17:24 ` Andreas Röhler
2015-10-26 11:05 ` rjd
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=loom.20151022T180021-191@post.gmane.org \
--to=ryan.dixon@etas.com \
--cc=help-gnu-emacs@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.