From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62696: python.el: Extra indentation for conditionals Date: Thu, 20 Apr 2023 11:22:35 +0300 Message-ID: <83zg7355f8.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15640"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62696@debbugs.gnu.org, npostavs@users.sourceforge.net, gustaf.waldemarson@gmail.com, gastove@gmail.com, dgutov@yandex.ru To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 20 10:23:11 2023 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 1ppPZP-0003rH-Sw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Apr 2023 10:23:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppPZI-0002Cm-AH; Thu, 20 Apr 2023 04:23:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppPZG-0002Ce-Or for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 04:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppPZG-0005Im-60 for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 04:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ppPZF-0001mz-KP for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 04:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Apr 2023 08:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62696 X-GNU-PR-Package: emacs Original-Received: via spool by 62696-submit@debbugs.gnu.org id=B62696.16819789536846 (code B ref 62696); Thu, 20 Apr 2023 08:23:01 +0000 Original-Received: (at 62696) by debbugs.gnu.org; 20 Apr 2023 08:22:33 +0000 Original-Received: from localhost ([127.0.0.1]:36465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppPYn-0001mL-4r for submit@debbugs.gnu.org; Thu, 20 Apr 2023 04:22:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppPYi-0001m3-Vo for 62696@debbugs.gnu.org; Thu, 20 Apr 2023 04:22:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppPYd-0005E0-15; Thu, 20 Apr 2023 04:22:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zpJll0JGi3FF0ddUwH/NqZwdDJ0st0HlrWxwiyWlsmY=; b=oZSR8ROc/Wc5 MHR7Eo82T66xWrP3GgTbHOfX6DWlcJHqjLJCqjQTIwONiV9RxQAlJUaC8CaIhdcneak3FNmv+n70P DiaIFdKwTS0ZfWf4amzA33Ige1+aDAbqzHX3W29kD+xNvDJUbwwv/GXNItdXiuKQBx0JmGk9xif/m nuXg91r+Rdw5IyzfY0MtwEepBHAfdXB9nyYbIUskBThKpDPZPSzny0Z/YNH05w5WOYcmPqtLDngg5 stV5CROaAeomg5AJsssxDIc17g0CpEyB6ZrHaxIKcKeKt9Y4kdu5Ox0B3diOKlZGSAGc7PwmUyuvy NW0UI1rV7bodVkAi6xNTCw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppPYc-0001S7-Ho; Thu, 20 Apr 2023 04:22:22 -0400 In-Reply-To: (message from kobarity on Tue, 18 Apr 2023 23:23:35 +0900) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260314 Archived-At: > Cc: 62696@debbugs.gnu.org, Dmitry Gutov , > Ross Donaldson , > Noam Postavsky > Date: Tue, 18 Apr 2023 23:23:35 +0900 > From: kobarity > > Gustaf Waldemarson wrote: > > I think that's a really good idea actually. It might also be a good idea to add a > > negative example (i.e., the black-indentation style you mentioned earlier), or > > a reference to one (maybe to the tests?) > > I think the best way is to update the docstring of > `python-indent-def-block-scale'. So, I am also CC'ing this mail to > the members of Bug#28475, where `python-indent-def-block-scale' was > introduced. > > I made a separate patch to update the docstring of > `python-indent-def-block-scale'. I think the name > `python-indent-def-block-scale' itself is a bit misleading, but I have > left it as is for compatibility. The following is my proposal of the > docstring. What do you think? > > "Multiplier applied to indentation inside multi-line blocks. > The indentation in parens in the block header will be the current > indentation plus `python-indent-offset' multiplied by this > variable. For example, the arguments are indented as follows if > this variable is 1: > > def do_something( > arg1, > arg2 > ): > print('hello') > > if this variable is 2 (default): > > def do_something( > arg1, > arg2): > print('hello') > > This variable has an effect on all blocks, not just def block. > This variable only works if the opening paren is not followed by > non-whitespace characters on the same line. Modify > `python-indent-block-paren-deeper' to customize the case where > non-whitespace characters follow the opening paren on the same > line." Do these two patches replace every other patch posted in this discussion? Are these two patches ready to be installed, or are you still discussing the issue? Thanks.