From unknown Tue Jun 17 01:48:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19906: python.el: indenting parenthesized lists Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: fgallina@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Feb 2015 20:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19906 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19906@debbugs.gnu.org Cc: fgallina@gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: fgallina@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14243781943891 (code B ref -1); Thu, 19 Feb 2015 20:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Feb 2015 20:36:34 +0000 Received: from localhost ([127.0.0.1]:48980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOXpp-00010g-LJ for submit@debbugs.gnu.org; Thu, 19 Feb 2015 15:36:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45947) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YOXpm-00010X-Hf for submit@debbugs.gnu.org; Thu, 19 Feb 2015 15:36:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOXpl-0008BU-GI for submit@debbugs.gnu.org; Thu, 19 Feb 2015 15:36:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOXpl-0008BE-Cr for submit@debbugs.gnu.org; Thu, 19 Feb 2015 15:36:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOXpk-00074d-JU for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 15:36:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOXpd-00081N-Q5 for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 15:36:28 -0500 Received: from mail-qa0-x231.google.com ([2607:f8b0:400d:c00::231]:45487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOXpd-00081G-Lv for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2015 15:36:21 -0500 Received: by mail-qa0-f49.google.com with SMTP id w8so8206756qac.8 for ; Thu, 19 Feb 2015 12:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=yp7+ASP3Vs5O5z00604cwuvOkETCRTM/e8HJPbGrpi4=; b=qQVDWtRM5GlV1pQF7hHTMTJkzrjv7dDF7wkGvSbEK5aY9KloEmrUp+a7MFPTH3n86w wRiqUbhHGy2ajr5aohdDeZvq/58NgPR5QzxhBSXoPBDTC4X+hTSCUqvVK0raVO6OT8j8 TX688PL2vb0iv73cpUToI2xVKZn41CVOIsLUBPGNC2n+tbsg2x9+p+kMLo+upG+xu01R qS17P6gQB2XwkUONj8Q8Ax/fW0Z4wvE5QDgN6d9P9jPIOOoDwYdKDWn7BS66hz8+winx okG+HW33V7H+t8MC67Qf6YC8H6z5QtBYuPiArcOmwqLcclP+F43hd9el6aFbr5b9N0ih JqIA== X-Received: by 10.140.231.204 with SMTP id b195mr15858427qhc.98.1424378181289; Thu, 19 Feb 2015 12:36:21 -0800 (PST) Received: from carlos ([190.18.155.203]) by mx.google.com with ESMTPSA id x7sm17818258qas.29.2015.02.19.12.36.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Feb 2015 12:36:20 -0800 (PST) From: Carlos Pita Date: Thu, 19 Feb 2015 17:36:11 -0300 Message-ID: <87ioextz9g.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Say * is the point. Try: def f(a,* You get: def f(a, * which is fine. Now try: def f(a,*): You get: def f(a, *): which is wrong. I've not further investigated this issue, but the trailing parenthesis shouldn't affect indentation. Cheers -- Carlos From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 05 22:16:04 2015 Received: (at control) by debbugs.gnu.org; 6 Jul 2015 02:16:04 +0000 Received: from localhost ([127.0.0.1]:41237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBvwx-0005id-ES for submit@debbugs.gnu.org; Sun, 05 Jul 2015 22:16:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54533) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBvwv-0005i7-Hg for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:16:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBvwk-0003lF-SZ for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:15:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBvwk-0003lA-D3 for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:15:50 -0400 Received: from [190.246.172.180] (port=50837 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZBvwj-0002gl-M2 for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:15:50 -0400 From: fgallina@gnu.org (=?utf-8?Q?Fabi=C3=A1n?= Ezequiel Gallina) To: control@debbugs.gnu.org Subject: 25.0.50; python.el and IPython Date: Sun, 05 Jul 2015 23:15:46 -0300 Message-ID: <87mvzarpyl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) merge 20708 20580 merge 19906 20742 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 05 22:24:49 2015 Received: (at control) by debbugs.gnu.org; 6 Jul 2015 02:24:49 +0000 Received: from localhost ([127.0.0.1]:41247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBw5Q-0005zZ-Mw for submit@debbugs.gnu.org; Sun, 05 Jul 2015 22:24:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58321) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBw5O-0005zC-UU for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:24:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBw5F-0007nN-TT for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:24:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBw5F-0007nB-Pw for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:24:37 -0400 Received: from [190.246.172.180] (port=50941 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZBw5F-0003jP-4Y for control@debbugs.gnu.org; Sun, 05 Jul 2015 22:24:37 -0400 From: fgallina@gnu.org (=?utf-8?Q?Fabi=C3=A1n?= Ezequiel Gallina) To: control@debbugs.gnu.org Subject: Date: Sun, 05 Jul 2015 23:24:33 -0300 Message-ID: <87io9ykopq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) merge 20560 19906 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 20 16:51:33 2019 Received: (at control) by debbugs.gnu.org; 20 Apr 2019 20:51:33 +0000 Received: from localhost ([127.0.0.1]:46856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHwxQ-0006Uz-RZ for submit@debbugs.gnu.org; Sat, 20 Apr 2019 16:51:33 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:44653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHwxP-0006Uj-O9; Sat, 20 Apr 2019 16:51:32 -0400 Received: by mail-qk1-f173.google.com with SMTP id y5so4561015qkc.11; Sat, 20 Apr 2019 13:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=OWPGKqseuGKI2TrEqkcsmcFLeJiwtP9CCN3CE6/efX0=; b=iRwUlt6BtpAdxbye7fJGRo/QqniHscPQS7oEt4V7InB3Bhd9jE/4xxq5R8chWgY+Z4 YlsofRVl2xFP9SMXV7x28Eq/geDHHO07MY4G5MjowTpJX47adZm4lAghXeVmojg7etNM LB92JXW1Z32fWfEAldzM5lkFV6TaABTouWoRU2+TRcn4Izqhr9niKN1uxIwpPIihyFPa 7S0MoIyXt6hk6VFPCPCc7pB6fb23Jdl3H3O5hne89ql0vW5buNAo8Kiblhp1gY4zHiBI vpGUwiOoBA/wmNCu48z1tY6Ny1zxt2aArq1CjvcQ7Yfi7+S3pSobqu/FFk1KP+npLgmG 7COA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=OWPGKqseuGKI2TrEqkcsmcFLeJiwtP9CCN3CE6/efX0=; b=Zj+4/rXfoYxvnMzzJKB+QiLu6pdTpJIdxnXUKwYBEp9ko2rk0HADWRzATT+hg3ZLzf wVOgw/ASviIs/Jj6eNrVuIY3Q6po1UQJMACzAA2gACIlVsWYiSKkq8ydiJ+SrTmkx793 9hkeIIswns4fR0a/9LiodOQOnJLYJ9cK6V5KbhGccNaTvB8JjTXaJ2+DJyMblc5x4oEN xiIIwYaABfHrNOfNn7uVftfOfPcqI0QsxvVvzzNQByHbCtsBRfgp9mBIrWL9L+C4fQF+ ngzdlkHNTZwxi8JQdcuc+rB41v3WHzhFCAA4x/8St6BbSkpgSjMOb7uDVneKwM8aZ3Qn zP6g== X-Gm-Message-State: APjAAAW20znpyX2e2XAY5RSBoUvFCd+IcAVge7LHu7cOWTyoRK/pKhV7 wEVpiZLwDNUt1DiQS6fLZMBqM2xF X-Google-Smtp-Source: APXvYqw/lNisXOMu82hbCvoNeasYz82/L//ZoVQGqM03ZycIvQjEXG1PaALfuQabtuPZM9gYmqwdeQ== X-Received: by 2002:a37:614e:: with SMTP id v75mr8890422qkb.27.1555793486143; Sat, 20 Apr 2019 13:51:26 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e4sm4131236qkg.6.2019.04.20.13.51.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 20 Apr 2019 13:51:24 -0700 (PDT) From: Noam Postavsky To: 20742@debbugs.gnu.org Subject: Re: bug#20742: 24.5; [PATCH] python.el: fix close paren indentation to match pep8 References: <87wpc8bdjk.fsf@users.sourceforge.net> Date: Sat, 20 Apr 2019 16:51:23 -0400 In-Reply-To: <87wpc8bdjk.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Wed, 01 Mar 2017 21:47:11 -0500") Message-ID: <87sguctn78.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: Tommi Komulainen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain tags 20742 + patch quit >> When opening paren is followed by newline the closing paren should follow >> the current indentation. Otherwise the closing paren should be aligned >> with the opening paren. This fixes the latter case. #20742 > > I'm having trouble applying this. > > error: corrupt patch at line 11 > Applying: python.el: fix close paren indentation to match pep8 > Patch failed at 0001 python.el: fix close paren indentation to match pep8 I managed to get this applied; I've replaced the python-test.el modifications, partly because they're written as updates to the existing tests which makes them a bit harder to follow, and partly to make more clear that the patch is below the 15 line copyright limit. I'll push to master in a week or so if there are no further comments. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-python.el-Fix-close-paren-indentation-to-match-pep8-.patch Content-Description: patch >From e0acfb7254f97f623286e65483535c1b6312f4ba Mon Sep 17 00:00:00 2001 From: Tommi Komulainen Date: Fri, 19 Jun 2015 18:53:52 +0200 Subject: [PATCH 1/2] python.el: Fix close paren indentation to match pep8 (Bug#20742) * lisp/progmodes/python.el (python-indent--calculate-indentation): When opening paren is followed by newline the closing paren should follow the current indentation. Otherwise the closing paren should be aligned with the opening paren. This fixes the latter case. Copyright-paperwork-exempt: yes --- lisp/progmodes/python.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index eb3e31c4b7..188bc973d9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1070,12 +1070,18 @@ (defun python-indent--calculate-indentation () (`(,(or :after-line :after-comment :inside-string - :after-backslash - :inside-paren-at-closing-paren - :inside-paren-at-closing-nested-paren) . ,start) + :after-backslash) . ,start) ;; Copy previous indentation. (goto-char start) (current-indentation)) + (`(,(or :inside-paren-at-closing-paren + :inside-paren-at-closing-nested-paren) . ,start) + (goto-char (+ 1 start)) + (if (looking-at "[ \t]*\\(?:#\\|$\\)") + ;; Copy previous indentation. + (current-indentation) + ;; Align with opening paren. + (current-column))) (`(:inside-docstring . ,start) (let* ((line-indentation (current-indentation)) (base-indent (progn -- 2.11.0 --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0002-Add-test-for-previous-change.patch Content-Description: patch >From 8649d874d5158d91b0b6056bc66b9a99f4c1c31a Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 20 Apr 2019 15:31:51 -0400 Subject: [PATCH 2/2] ; Add test for previous change * test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren): New test. --- test/lisp/progmodes/python-tests.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index b940f45bb9..a517909717 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -260,6 +260,19 @@ (ert-deftest python-indent-pep8-3 () (should (eq (car (python-indent-context)) :inside-paren-newline-start)) (should (= (python-indent-calculate-indentation) 4)))) +(ert-deftest python-indent-hanging-close-paren () + "Like first pep8 case, but with hanging close paren." ;; See Bug#20742. + (python-tests-with-temp-buffer + "\ +foo = long_function_name(var_one, var_two, + var_three, var_four + ) +" + (should (= (python-indent-calculate-indentation) 0)) + (python-tests-look-at ")") + (should (eq (car (python-indent-context)) :inside-paren-at-closing-paren)) + (should (= (python-indent-calculate-indentation) 25)))) + (ert-deftest python-indent-base-case () "Check base case does not trigger errors." (python-tests-with-temp-buffer -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 20 16:58:47 2019 Received: (at control) by debbugs.gnu.org; 20 Apr 2019 20:58:47 +0000 Received: from localhost ([127.0.0.1]:46865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHx4Q-0006gf-Dz for submit@debbugs.gnu.org; Sat, 20 Apr 2019 16:58:47 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:46432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHx4O-0006gM-DK; Sat, 20 Apr 2019 16:58:45 -0400 Received: by mail-qk1-f170.google.com with SMTP id w73so2418018qkb.13; Sat, 20 Apr 2019 13:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rOkax71soJsVa/zbc4JmCRuFVirc1U2iiw7j1dk2FF4=; b=mHdtPEeBoNqRU32hSx3xV0xKXIFrbF+4HPRm1Bf31Zrv4y54fl976gpLe7nCUTMuqF 4GKSGuiHq4QVXzy126ty2Rs4SM2ovaMA1DYto+mAi9Ma4IkPv5bodzJQZ9hNg4OWCqiZ fFvmxqoC2AtquKMYgpRVCnV65UXTEI7iQcRuQ3T42WbvyQKqNvQOsedwzNHXESlqhCqY FWtMEED+PcNn9vsCWeUy/KORGiLsKh7rPW+BH0kHCw87OIYJqjsOUy3dOxUkAEuk3/XK /bv7zloID+igVd5GMAqVODiUb3VPf2b73fOoPPsjlTKr2QnQkxgSuCubeomqZl94C7EJ 4eag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rOkax71soJsVa/zbc4JmCRuFVirc1U2iiw7j1dk2FF4=; b=Jap9lGm38A3nMjhmRshwkW9t7euwo0xPyiiFifxahHw/KkmojW+8ZV5udOQOYlplqx C3wnNIB8mlu9xMviQraQTsDmD7Tr1S7ficWqwswbZEkgwZBsGwWQ2EtkVEKJGcG3r8xu qN5upi4959lnK5GTxYO6Auhkn4DLj/xXxdFyIMflK9OmDt73IRtCpxtwwoe57/vWhDvA M3TWnmmXU+/bx2Qx8i85Hqnqa4gDPT838IagT3lpqR7n5zJwu/neN7fzWug3AdBv6Wlb DlMh+s9ZQanz0qGWZ9LmJ2hew/Lcy6zU8ODxcEk5r0/A0X0m0YxX+4nAZ1oDUKt1CHGO T04Q== X-Gm-Message-State: APjAAAUjmbWoLp8+e+FLoW2YZNhPGXixEbSnSEAj2npIIaEStw4kSdlc y8zmoKATSrJ6BNgre/YAV6j+GTn/ X-Google-Smtp-Source: APXvYqwTZgTTKL/DmvhvK7xNOrfzSj8euKp/XNFk2rjerusp3sfDCqqO5nRt8xN1kEAIIti8vwMl2A== X-Received: by 2002:a05:620a:1438:: with SMTP id k24mr8369372qkj.165.1555793918747; Sat, 20 Apr 2019 13:58:38 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id s30sm4027832qkm.43.2019.04.20.13.58.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 20 Apr 2019 13:58:38 -0700 (PDT) From: Noam Postavsky To: Glenn Morris Subject: Re: bug#20560: 24.5; I am not happy with the new Python mode indentation behaviour References: <5551D233.1090202@orange.fr> Date: Sat, 20 Apr 2019 16:58:37 -0400 In-Reply-To: (Glenn Morris's message of "Tue, 12 May 2015 12:06:38 -0400") Message-ID: <87pnpgtmv6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control Cc: Fabrice Salvaire , 20560@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) # patch for 20742 doesn't help for 20560 unmerge 20560 forcemerge 33979 20560 quit Glenn Morris writes: > Fabrice Salvaire wrote: > >> my_list = [ >> ____1, 2, 3, >> ____4, 5, 6, >> ] > > When I type that, I get an error, so perhaps it is not intended: > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > =(nil 5) > python-syntax-closing-paren-p() > (and (python-syntax-closing-paren-p) (progn (forward-char 1) (not (nth 1 (or nil (syntax-ppss)))))) > (if (and (python-syntax-closing-paren-p) (progn (forward-char 1) (not (nth 1 (or nil (syntax-ppss)))))) (progn (cons :inside-paren-at-closing-paren start))) > (save-excursion (skip-syntax-forward " ") (if (and (python-syntax-closing-paren-p) (progn (forward-char 1) (not (nth 1 (or nil (syntax-ppss)))))) (progn (cons :inside-paren-at-closing-paren start)))) I'm not getting this anymore, perhaps it's been fixed in the meantime (I've tested only in 25.3 and 26.2, I don't have 24.5 building at the moment). At any rate, the OP seems to be the same as 33979 (though different from 20742 which it was previously merged to). From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 28 16:47:26 2019 Received: (at control) by debbugs.gnu.org; 28 Apr 2019 20:47:26 +0000 Received: from localhost ([127.0.0.1]:37895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKqhq-0003jq-83 for submit@debbugs.gnu.org; Sun, 28 Apr 2019 16:47:26 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:38486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKqhn-0003ja-Ab; Sun, 28 Apr 2019 16:47:24 -0400 Received: by mail-qk1-f172.google.com with SMTP id g141so531115qke.5; Sun, 28 Apr 2019 13:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=unvm6er+j8St6NBQO9TIs/BO00anTS2sBFjQ/4zTv1s=; b=i2O/sZWAJIvQFTE/rAFhnxUqnTnYUmz2jsgu/DRbPYz7RfA9MkEFoneqVqlFloUg94 Sc/jAWZSo2akg88NpuhnbKcGUJaVu32YXfHRUGsH/dCR1yWtbgreBm0KsXTUzvCb59aP 0ISOq9dCbxKkqE5w7cSZEV6w8Bz3wPjjVP7nk4Pu+CTbqroqI1UGdK6EI45DL2mHkD6i 0R88YfTkEWNcmJbP4nSgjbiFuLzGj2TKwMYQ4ubNNya2xx+dj0mYKtQff3NcKqQKP2jn 1D/+8QRSlSDjzLSB7q9HE1QvMqBrF4gmAw842IgRZUqhQOeJUr9RjPYNkEqldrBBb9Xr stPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=unvm6er+j8St6NBQO9TIs/BO00anTS2sBFjQ/4zTv1s=; b=ZHNciQijg2m8IJvp4nnW/Q4K4dj9HWv1DHGTeX+YYyq9/6nUKs+yXbys5+TZ5BcYOV OPm15y2qZEwr05Mr12bJ8bHEzCHZ01UdOLB5NyBj6Usa7AK9NjOd5a+XUFi1IErxLPbP e8mBttInEygfKIp4hEnx+yUG85pLvjcMI8mEDoC9ocstQZEKIm6neNBJUcrfnhk+Enko uJIqcP3cda42t2sYWf9XljR3Iy7tuzEwXHhQJcPReY4MuOCMpv0XNc/wVg+FvxCodez0 iBiUN/gTj11H9gnbKVeh0kjNNbzP3VgA1/8aYWe8m+b+B18pECkdt/uNLEJqcN9SN+CR tAXw== X-Gm-Message-State: APjAAAUPXscZ1r8CqjkMT2sCfe2gEFNuHE034TUMrYzp1WFlCHEO3Gtb /Uw+Y3o5x9wN/oOPquZQ8Uv9RYQr X-Google-Smtp-Source: APXvYqytv+296bGKXMHvRj9Hr1ErvdsYc8vS2geS5R47QsAXAwqLyOuDIbm+DA77DFBivxV07SfiSA== X-Received: by 2002:a37:6897:: with SMTP id d145mr33417359qkc.185.1556484437500; Sun, 28 Apr 2019 13:47:17 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id d55sm1900485qtb.59.2019.04.28.13.47.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Apr 2019 13:47:16 -0700 (PDT) From: Noam Postavsky To: 20742@debbugs.gnu.org Subject: Re: bug#20742: 24.5; [PATCH] python.el: fix close paren indentation to match pep8 References: <87wpc8bdjk.fsf@users.sourceforge.net> <87sguctn78.fsf@gmail.com> Date: Sun, 28 Apr 2019 16:47:15 -0400 In-Reply-To: <87sguctn78.fsf@gmail.com> (Noam Postavsky's message of "Sat, 20 Apr 2019 16:51:23 -0400") Message-ID: <877ebdq2lo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: Tommi Komulainen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 20742 fixed close 20742 27.1 quit > I'll push to master in a week or so if there are no further comments. Done. 3fc1d77a43 2019-04-28T16:45:13-04:00 "python.el: Fix close paren indentation to match pep8 (Bug#20742)" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3fc1d77a43818666542740fc34167c1faee30d5f