From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: kobarity Newsgroups: gmane.emacs.bugs Subject: bug#62696: python.el: Extra indentation for conditionals Date: Thu, 13 Apr 2023 00:26:28 +0900 Message-ID: References: Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10947"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: 62696@debbugs.gnu.org To: Gustaf Waldemarson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 12 17:27:33 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 1pmcNh-0002hq-67 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 17:27:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmcNE-0004UD-HC; Wed, 12 Apr 2023 11:27: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 1pmcNC-0004Tt-Tk for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 11:27: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 1pmcNC-000443-LR for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 11:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmcNC-0004jk-Co for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 11:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 15:27:02 +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.168131319918172 (code B ref 62696); Wed, 12 Apr 2023 15:27:02 +0000 Original-Received: (at 62696) by debbugs.gnu.org; 12 Apr 2023 15:26:39 +0000 Original-Received: from localhost ([127.0.0.1]:40719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcMp-0004j2-D8 for submit@debbugs.gnu.org; Wed, 12 Apr 2023 11:26:39 -0400 Original-Received: from mail-pl1-f169.google.com ([209.85.214.169]:46594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmcMn-0004ik-UU for 62696@debbugs.gnu.org; Wed, 12 Apr 2023 11:26:38 -0400 Original-Received: by mail-pl1-f169.google.com with SMTP id w11so11770088plp.13 for <62696@debbugs.gnu.org>; Wed, 12 Apr 2023 08:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681313192; x=1683905192; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:from:to:cc:subject:date:message-id:reply-to; bh=aEdroJchbOI/O5oXz2IK+Kgwgxfebxc2epegrVU9yHw=; b=RG1YLa8b2C9vIJFgvTRQqg0kf8ppwJCOD3sjCoBvsFKfXbYtxrU/yTBqJimJyYBQPR 7/35wFm5prIt6YengY2Oq9j+YfqLblsQdYd/uNkCX57ukUSd7vesfTk3eUBrtlRturwK ibPHBFvi9SesZ6sYgDE2KRUnU6NYtE/exQkHnZxlDZwqvV4gTITqFQe1OjFei9wyd/a5 K7aJzy/Njxn6Ho/5TcgR+b+b0m68+nmiQoA9N9JQdxmzAQB0xwtYdKh1PdvflZmwSLQW MBcSlhidnNNNgvTvIm04j1osvxtuKP8Z5ZyuF82T4rfIcuKoXgaGrjIcT1DDzem1HkwE uM+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681313192; x=1683905192; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aEdroJchbOI/O5oXz2IK+Kgwgxfebxc2epegrVU9yHw=; b=kQnOG0+b57d/xTVN4BoKS+do0Rpc/NrEbXQBt0DN26EiLXXSR3ErlCeZ1dAh/n7DsD BNqFrgvrdjZiluVY2xZeTW5Yv3i8phxjwVx56zqhrlhVLtHg0gDnL0xB3zgN3mhl8tI9 9yF3+6gb464X7abo76hLXzILdRun+QYHyWSZYzwYePB+yCPHwbWPJ2nZbz1ob7XcAcCu 0UsAAcOHixlJGdUvYnEpa03TV/MWLr4CAID+crC4/u0ag9qm2yPdb3rX96r2kg4mdWm2 uqyKQpmH4GwJDR0dkZkTt3DSASNIfLKj7mDylJT09w6xKUnRb725VrR8+ooe/IB5MIiD lN3w== X-Gm-Message-State: AAQBX9fIRE+501zW7HSOkkScbkJhc36aUzV0f8D9trKZIhrEdLY0HBPv Gs2WOD+n+/y7kmONCT3EOlk= X-Google-Smtp-Source: AKy350bdnpk2/35GHaMiefUp6eZI4nHnVf01kXu+Ei6k7ZXC0koUf24ox9T6Q1sSDyP+RK7TuWQMEA== X-Received: by 2002:a05:6a20:3a88:b0:d6:17fc:9f66 with SMTP id d8-20020a056a203a8800b000d617fc9f66mr2808912pzh.18.1681313191583; Wed, 12 Apr 2023 08:26:31 -0700 (PDT) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id a4-20020a63d204000000b00502ecc282e2sm10571187pgg.5.2023.04.12.08.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 08:26:31 -0700 (PDT) In-Reply-To: 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:259765 Archived-At: Gustaf Waldemarson wrote: > "Increase indentation inside parens of a block. > When this variable is set to non-nil and the contents of a block > inside parens are indented to the same level as outside the same > block, increase the indentation of the line." Hi Gustaf, Thank you for your suggestion. I think this is more readable and would like to make changes in this direction. Just to be clear, what I wanted to express by "some items follow the opening paren on the same line in a block statement" is that it only works with the code like the following: #+begin_src python if ("VALUE" in my_unnecessarily_long_dictionary and some_other_long_condition_case): do_something() #+end_src And it does not work for the code like the following: #+begin_src python if ( "VALUE" in my_unnecessarily_long_dictionary and some_other_long_condition_case): do_something() #+end_src This is intentional. Because this code is usually written as follows: #+begin_src python if ( "VALUE" in my_unnecessarily_long_dictionary and some_other_long_condition_case ): do_something() #+end_src In this case, there is no need for extra indentation. As I wrote in the previous mail, this case is processed by the existing code and can be customized with `python-indent-def-block-scale'. However, this may be a marginal difference. In any case, I will wait a few more days for other comments and hope to revise the patch over the weekend. Best regards, kobarity