From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 34268@debbugs.gnu.org
Subject: bug#34268: 27.0.50; wrong indentation in python mode
Date: Thu, 23 Sep 2021 14:37:04 +0200 [thread overview]
Message-ID: <1d8a3c32-8355-b51e-dbdf-6d3cc17eab44@easy-emacs.de> (raw)
In-Reply-To: <877df8qnmn.fsf_-_@gnus.org>
On 22.09.21 23:57, Lars Ingebrigtsen wrote:
> Valentin Ignatev <valentignatev@gmail.com> writes:
>
>> Hey Sam, I've looked in the python.el code and it seems that it reuses
>> python-indent-def-block-scale for calculating an indentation.
>>
>> The default value is 2 which is why inside-parens indent doubles. Setting its
>> value to 1 fixes the issue.
>>
>> I also wonder why authors choose double indent for aligning function
>> arguments. Is this some kind of an oldschool code style? :)
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> If I understand correctly (and I may well not -- I don't write much
> python), this is just a preference issue, and setting
> `python-indent-def-block-scale' to 1 fixes the issue?
>
> If that's what's recommended by the standards, should we flip the
> default to 1?
>
> I've added Augusto to the CCs; perhaps he has an opinion here.
>
py-compute-indentation from python-mode.el here jumps to the beginning
of the list and calculates the indent by adding the default-indent of
this line.
next prev parent reply other threads:[~2021-09-23 12:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 21:04 bug#34268: 27.0.50; wrong indentation in python mode Sam Steingold
2019-02-19 13:13 ` Bhavin Gandhi
2019-02-19 13:53 ` Sam Steingold
2019-06-09 21:24 ` bug#34268: Configuration option to fix the issue Valentin Ignatev
2021-09-22 21:57 ` bug#34268: 27.0.50; wrong indentation in python mode Lars Ingebrigtsen
2021-09-23 12:37 ` Andreas Röhler [this message]
2021-09-23 21:08 ` Augusto Stoffel
2021-09-23 22:01 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d8a3c32-8355-b51e-dbdf-6d3cc17eab44@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=34268@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).