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#63959: python-mode does not keep indentation in square brackets [] Date: Sat, 01 Jul 2023 22:42:55 +0900 Message-ID: References: <0a9099c91a3cd323c78e08fb6263d11fe66429bb.camel@yandex.ru> <83mt18285n.fsf@gnu.org> <45d2d886ba9bd52f33c588c457cfc0338f504eca.camel@yandex.ru> <93804360-aafe-fe2f-46fa-f2fca67d9add@easy-emacs.de> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1280"; 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: Eli Zaretskii , Konstantin Kharlamov , Stefan Monnier , 63959@debbugs.gnu.org To: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 01 15:44:19 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 1qFate-0000BK-MK for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jul 2023 15:44:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFatQ-0008La-N6; Sat, 01 Jul 2023 09:44: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 1qFatO-0008KS-Lp for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 09:44: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 1qFatO-00027L-9l for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 09:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFatO-0002Ip-4x for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 09:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63959 X-GNU-PR-Package: emacs Original-Received: via spool by 63959-submit@debbugs.gnu.org id=B63959.16882189908787 (code B ref 63959); Sat, 01 Jul 2023 13:44:02 +0000 Original-Received: (at 63959) by debbugs.gnu.org; 1 Jul 2023 13:43:10 +0000 Original-Received: from localhost ([127.0.0.1]:56984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFasY-0002Hf-81 for submit@debbugs.gnu.org; Sat, 01 Jul 2023 09:43:10 -0400 Original-Received: from mail-pj1-f49.google.com ([209.85.216.49]:45315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFasV-0002HR-Ti for 63959@debbugs.gnu.org; Sat, 01 Jul 2023 09:43:09 -0400 Original-Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2637ab3d8efso749539a91.3 for <63959@debbugs.gnu.org>; Sat, 01 Jul 2023 06:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688218982; x=1690810982; h=content-transfer-encoding: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=TJOTAcwxLrCjPBVkNQXhxpnAtqz5Fqv5fRDQKgZQGOk=; b=Lh9DVkclRyCJCxHgR5l1TjTrLwi18ScasM8r1XJhJUsVC2yW5C5Vv/jhTXLCSYsY3t /g05QUk9+Cx7JI2PISf6/T9FWyH3pQ8cuePU1+vVAgFUWhq7J6LExhfS6b+nAf7+xb/E pcFpjcbr8Nk6v1GgWtPeQj6y2chZlNW7638uYCR0QuGyhwC5pM0wbx/7leW+JOwRFvG2 HwqwfAt3JNZpIV9DC3MrzdHcvEnqxdFN37pqW3IojsszfKFWXY5LOvpA7/hL6oxoQvLX 2ZdZyTrEvfOVdbPVIZlDHVW077UBtPDKWPldLRZvftXYMSEkVcdpJoOuZBOFrQ+PcuQC /0BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688218982; x=1690810982; h=content-transfer-encoding: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=TJOTAcwxLrCjPBVkNQXhxpnAtqz5Fqv5fRDQKgZQGOk=; b=AZBMjrKDLME3xxVx6NAa9d75WXRPG7350ThM6tv53SSYG7F7VzBzFhtCjqmjtBAgx+ PNvaXm9ZB+tOPFRI/Pa8USuK04OKeNC0+xOZFzbD0myRPqVW+hYcd3rUb7VQ97Bihdpk TPv1zPX6NhAGV5efDcavP6lk9trLUBb7IuCGZBSw2rdjTORbAiKbsl5LjPB6mwbO8PeW IumwGuUkBk/fmzoyuHBMfNOWvGLPzlG24XEItHN05GsjLoL9nm1XjeT571ZKJLoxdnEv JErEyNfscySkr0NwGAqOmJ7a7kejxqmZDANV4V6c50qtRKxAo4HWfumO/apmnUeqZ9cF cvgw== X-Gm-Message-State: AC+VfDwI8JuA1eefWV5rSG9nLLlUSeyy3nrv5euEzEXn7zdFoesmVjIK vxe+CtfY+TYzzJAnvLMfBKA= X-Google-Smtp-Source: APBJJlGMjDzpEwvZW9vGOQUQyHVgS+mC1CWBRtF7QQ5OoN8g4S550+M62TqFxDnZUCITMAam4jailQ== X-Received: by 2002:a17:90a:6b4f:b0:262:e629:f545 with SMTP id x15-20020a17090a6b4f00b00262e629f545mr3663833pjl.1.1688218981905; Sat, 01 Jul 2023 06:43:01 -0700 (PDT) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id k7-20020a17090a658700b00262eccfa29fsm10110933pjj.33.2023.07.01.06.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jul 2023 06:43:01 -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:264405 Archived-At: Andreas R=F6hler wrote: > Thanks for your explanation, which makes me better understand your > endeavour. A question remains: is this new feature worth that possibly > raise of complexity? Your patch provides a higher degree of freedom > while keeping regularity=A0 - which is a pro. I think it is natural for many people to indent the same as the previous line. In fact, it is standard behavior outside the parens. For example, if you intentionally change the indentation of the first line of a block, the following lines will have the same indentation: def func(): a =3D 1 # Intentionally changed. b =3D 2 # Same indent as previous line You can even do the following, although it will result in an IndentationError when executed: def func(): a =3D 1 b =3D 2 # Intentionally changed. c =3D 3 # Same indent as previous line If inside the parens, the following will not result in an IndentationError: a =3D ( 1, 2, # Intentionally changed. 3) # Same indent as previous line So I rather think the rule of indenting the same as the previous line is more useful inside parens. I would consider making the indentation the same as the previous line inside the parens a fix rather than a new feature. This is why I named the commit "Fix Python indentation of continuation lines within parens."