From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#34268: 27.0.50; wrong indentation in python mode Date: Thu, 23 Sep 2021 14:37:04 +0200 Message-ID: <1d8a3c32-8355-b51e-dbdf-6d3cc17eab44@easy-emacs.de> References: <877df8qnmn.fsf_-_@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4042"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 To: 34268@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 23 14:38:23 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTNzb-0000rQ-CE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 14:38:23 +0200 Original-Received: from localhost ([::1]:51406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTNzY-0001cB-FM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 08:38:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTNzH-0001bX-2r for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 08:38:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41369) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTNzG-0003Xz-Rn for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 08:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTNzG-0003A3-DY for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 08:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Sep 2021 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo confirmed X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163240063412086 (code B ref -1); Thu, 23 Sep 2021 12:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Sep 2021 12:37:14 +0000 Original-Received: from localhost ([127.0.0.1]:52915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTNyU-00038r-H9 for submit@debbugs.gnu.org; Thu, 23 Sep 2021 08:37:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTNyS-00038j-PC for submit@debbugs.gnu.org; Thu, 23 Sep 2021 08:37:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTNyP-0001UK-DB for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 08:37:12 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]:38565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTNyN-00038J-KI for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 08:37:08 -0400 Original-Received: from [192.168.178.63] ([94.134.177.121]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N336L-1mqnXQ0G2n-013JYW for ; Thu, 23 Sep 2021 14:37:05 +0200 In-Reply-To: <877df8qnmn.fsf_-_@gnus.org> Content-Language: en-US X-Provags-ID: V03:K1:PyImONuMAU5qv3E6siW8M4srqhgg1GcD431MabLug1E2V20brb0 dDv806lr4ImjRtIfkVDsmqy7n8om2WN+DV3CIy91KKPQWHLNExGcazD+QTIEpe6ngce6bSE gadUb7MQSZRS4wsj/f3qwZ5swe02iYeSv9Y10a9UQFNX+FOYdahM2PEp1GTrF4lxtQcBuRt VfQKb1JFBe169HW7V7U2Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:iy4QW4Lw+Zs=:X4fnhKSezBo6BPkP4PqAjE tDYM0OxK6RPqrohzTS9Nl2TES7HoQo5Ce7n+xB1wRcgSA1YzOUDNNgqGSKn/fBA7OzpBti2d1 bpB9MEIIBhvwkCr/0dyQuCiq0smoqb/63BY4as1v07pa+44brxn0PXyb6a8pO6q9ekRicNdNj bxBcbkNhU3hlNQJp3Da/swjJYPWyucqlN6ecD32HJNvwHbsC9iqEhnU8vA0z+wFqVvDy673gP f8qIgWN+K7pGNR015KmEa+zudX+eWR2WR2h+631jwkAXixhMiLhs8XsG9CV8LPom81boiQoFJ aAa4nIb8EJORsH2w8TlMGq7kqGmrtkdWsedkSOcbrs20mvnPa40gD2BvSoM0efZDc8xAjmXld u3nG7B1LWvGQpZM8oRlfS5gPcC10Rt91g8jW4J13cGL5l6J8DiQeW4SLcmIBGOn9FEVomnRV9 yDl3GZQOwvMB/Sjlhku8GuPlzWIGll6VMk9u8GS8SOpabS26NHCtIYZlW1+qRDd+R5iDN3tUE XBpbkZRPttnu7eFJngMqHdf2B87pWvIH8EuNipZLTHxztibGeBdLsGpV2X5xofPpUwOtgM4gn X0FJwFmlDayeI9tTPVTPUUTsDfgsqUjZD5As+7hDqaKFyTUzh1//BZmSIlC+l7Dmda1WiEXML XVMqMbvebD7egjXBotGKj9644d9qqsLdOkkD3OOK921BTQ3PjVPXBAlBDOQSZHO7kUWloN6x7 3gs1lCzuakjvG5dT0tiTgRTrcK00TE0IHmXp2VObulfddr6hCl7fXLSyXAQ= Received-SPF: none client-ip=212.227.126.133; envelope-from=andreas.roehler@easy-emacs.de; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215182 Archived-At: On 22.09.21 23:57, Lars Ingebrigtsen wrote: > Valentin Ignatev 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.