From unknown Fri Jun 20 18:13:01 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#56742 <56742@debbugs.gnu.org> To: bug#56742 <56742@debbugs.gnu.org> Subject: Status: 29.0.50; Python indendation problem after comment Reply-To: bug#56742 <56742@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:13:01 +0000 retitle 56742 29.0.50; Python indendation problem after comment reassign 56742 emacs submitter 56742 Stephen Berman severity 56742 normal tag 56742 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 24 11:43:11 2022 Received: (at submit) by debbugs.gnu.org; 24 Jul 2022 15:43:11 +0000 Received: from localhost ([127.0.0.1]:48492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFdl8-0000rP-W4 for submit@debbugs.gnu.org; Sun, 24 Jul 2022 11:43:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:57640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFdl4-0000rB-I3 for submit@debbugs.gnu.org; Sun, 24 Jul 2022 11:43:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFdl4-0002Pi-1x for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 11:43:06 -0400 Received: from mout.gmx.net ([212.227.15.15]:58961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFdl0-0002iv-NB for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 11:43:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1658677379; bh=XTz+WrrlYWN4a5BQISAXQthm79kvTn8H+Kd0D2v5poY=; h=X-UI-Sender-Class:From:To:Subject:Date; b=dbx4+Q8/q1kyIlL+kFDW4+i2T+9SStEBZdlaAc15+ARa9ljeJxEnHThTdqwQuYVEl Nc/FbFpONVfpbe9Kh6JUgEeLpGyOU5vrul0WLLxU+aQizrAoLjhL2/MtjgEVV8AJjI thdofd+beMX2UlcFWBc5uE8OOc0ZD7pbHJjcAJLw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs2 ([89.246.36.47]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MfHAH-1naGbI0lvH-00gq9y for ; Sun, 24 Jul 2022 17:42:59 +0200 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Python indendation problem after comment Date: Sun, 24 Jul 2022 17:42:58 +0200 Message-ID: <871qualdod.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:GfrH/QqW2DPHxNw8AIDyiBpwAjOjYpBvmJ/wmZcikWwBUU0f0Gp w7O4VxMx78AEt2Gd5rialAXKzzQQtDLk6lf+qtzLRxLgXSQ+MTeKAOzr89zi8Uo9mpb3a2/ Vc7TLxm3Pyls1519q8h/n8zHYHRYm9s5JMGDsZtGjASdVzfc4iSgCueDS6/P2rGi2UfV5KO uLcmUJMA4XDQV7aUCndcQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:G2x5tGjLB/o=:aW4pr7S7fuYxvhUkyuoqTP 8QkHwftJilQ6TQfcajxL+zd90oXMsdC318l5h24aQjM3imUmjmhKu+i7/NiGmhyGy0h3tY461 hKQ6oGo7ZmDO0wtK0hi6KxXXD2Mda+aXJHWgkGUA/bjHBl1qGf9KGeVcfBamztOWS9Zed0EV5 4jedLMWjVTW975zOl2UUIl4h4sKAQfQZWQzgtuibPCkybaXgq/2XfhBrSsGPwoGuhlbOijFf0 +Dx0yQCfOaylhv+nepvKzuJijeOJZ7dXIzFiEDEcIStpzGcDqv6N9SiqHFQf2MwZRf22yGucg FfdbFx8iBNGI1iXBmqEN6P4MKTvmlAOdKw8ASMbXoEOljdgkiXLOUGxGAGNcGPPoOCLKYGyuC YfHSgn+qArRJ8UbJlAy76CdMocBPDz4c/kR+Mq7uT5gGBDfqqgONTM9lF5lszMwh7xv54fY9R p/X2VSjY6IdUurhiU/fXtGlLUPIi50nb9RpbVMK3P5vTHmnIn5sPVdpE9mf/rd3Zihrp9LHjb n++dnjxIA8o69s/bGRV85PqpPNcZK118lj3+K7Z0lqiUEBcI9XvQxiDPSrMPXuFNKXQDUTHyJ Pq2gy+mj5WQJJXvVU/DJXx7LjBOSnyw7AnXKht3moo76EPUHffFGc+0KIWs5CfMEn0uC0WD1/ CsSKQvlogsMtxfQz97/aw1r7YQYJkzkpZhQ+N1aXdpQMgABIAuZtCRgqgGZ1+7PNF2NKl+RjU gIQmPCMlhXSKli+Sj5xCxkzk+b6j+dQId+slZCfKuPSBVs6n5R4I2l3zuFx4+DtMtxiHvOH84 KHa/1/fcd09PvEfaYZ5/qwVPCzFIfuQ+Qry0HZ46ALYQgf6BwvyLGXUGl+N3hKWD4CqFXTT1f xil4zW0Rrx/2qHPblK7+n3fskGQYyNSmvVINj2OVhg0hdOo0mKZwKEnm7HdzGltmO0W4R5+Wh nFUtgMUvYZZaGdBfrqCUwkiAh2NuiK5gCCsZyJLQuJBBbiZFvZdQrbTRRtLBhhMRuaK0lPuDM H59QflkI2RvIXDkKVFmDI4dUrFVf3tk4xuJsCpbOe8UUA/Vp7XIUqeqjF6wdafs8x4ouSREgf kQZf+RiH5uCb70vVJw/hYxkzR5VhB6M6ubFCnCTiwbfLtW3ib2MaX611A== Received-SPF: pass client-ip=212.227.15.15; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit 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: -2.4 (--) --=-=-= Content-Type: text/plain 0. emacs -Q 1. C-x b test RET 2. Insert the following into buffer "test": def test(n): if n < 0: return -1 # test else: return 0 2. M-x python-mode RET (with buffer "test" current) 3. Put point on the line containing "else:" and type TAB => "else:" is dedented to column 0 and remains there on typing TAB again (and again). If the line containing "# test" is deleted and point put back on the line containing "else:", then typing TAB indents "else:" to column 4 (where it was before being wrongly dedented) and remains there on typing TAB again (as it should). The same behavior happens with "elif" lines preceded by a comment line. The attached patch prevents the wrong dedenting, but I'm not familiar enough with the python.el code to be confident it's the correct fix. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-07-22 built on strobelfs2 Repository revision: 8434396fa362c6644ff23e1f48acace7b85ffe8f Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Linux From Scratch r11.0-165 Configured using: 'configure --with-xinput2 --with-xwidgets 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: python.el patch diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f31832fec9..01b6693f94 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5168,7 +5168,8 @@ python-info-dedenter-opening-block-positions (while (and (< (point) cur-line) (setq no-back-indent (or (> (current-indentation) indentation) - (python-info-current-line-empty-p)))) + (python-info-current-line-empty-p) + (python-info-current-line-comment-p)))) (forward-line))) no-back-indent))) (setq collected-indentations --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 26 08:51:51 2022 Received: (at 56742) by debbugs.gnu.org; 26 Jul 2022 12:51:51 +0000 Received: from localhost ([127.0.0.1]:52590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGK2R-000439-2u for submit@debbugs.gnu.org; Tue, 26 Jul 2022 08:51:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGK2N-00042g-Hp for 56742@debbugs.gnu.org; Tue, 26 Jul 2022 08:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=//k/QxKOgBDidapmKM8+BObqi4woJiynNuX+YOxCxbc=; b=NyeJZfwfDVrB4R2Lso0CUaXqGV HlK2TwV7PXTiznfgOvW/EAWN2AughcTvdhLvdY4l+K1e/VVZVtncC5D9ow7vgHJ6k18jygXO9yVrS qEw1cwgw7wxyTZd1Am//AdgnfHvRF+9CfXF5DR/dS+cv9DFg9exaK9fG/P72+9qHaqW8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGK2F-0006G5-FL; Tue, 26 Jul 2022 14:51:41 +0200 From: Lars Ingebrigtsen To: Stephen Berman Subject: Re: bug#56742: 29.0.50; Python indendation problem after comment In-Reply-To: <871qualdod.fsf@gmx.net> (Stephen Berman's message of "Sun, 24 Jul 2022 17:42:58 +0200") References: <871qualdod.fsf@gmx.net> X-Now-Playing: Neil Young's _Harvest_: "Words (Between The Lines Of Age)" Date: Tue, 26 Jul 2022 14:51:37 +0200 Message-ID: <87sfmo11gm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stephen Berman writes: > The attached patch prevents the wrong dedenting, but I'm not familiar > enough with the python.el code to be confident it's the correct fix. Perhaps Kobarity has some comments; added to the CCs. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56742 Cc: kobarity , 56742@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: -3.3 (---) Stephen Berman writes: > The attached patch prevents the wrong dedenting, but I'm not familiar > enough with the python.el code to be confident it's the correct fix. Perhaps Kobarity has some comments; added to the CCs. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 26 08:51:55 2022 Received: (at control) by debbugs.gnu.org; 26 Jul 2022 12:51:55 +0000 Received: from localhost ([127.0.0.1]:52593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGK2V-00043P-Eu for submit@debbugs.gnu.org; Tue, 26 Jul 2022 08:51:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGK2R-00042q-1E for control@debbugs.gnu.org; Tue, 26 Jul 2022 08:51:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nSUadmv620tytbsskxYi8N8qrJdCSnv8eqn/2bdkI+I=; b=V5KB8GXM93wVDJb+lIoHTxkd9m sEyHGUu/rgrVHJlVPPcXoMiwXb0+j8KMURtP7ZmjqlPNQRwKc2P/n+4zgl90W9ksAm117Nq1W3Vz6 HLeiaoYS9SJMxplTMtBoLui4DZlZy3rM2kr5b3TabCB1GddchwpUxsD7FodQw/IFYOdA=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGK2J-0006GG-9i for control@debbugs.gnu.org; Tue, 26 Jul 2022 14:51:45 +0200 Date: Tue, 26 Jul 2022 14:51:42 +0200 Message-Id: <87r12811gh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #56742 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 56742 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -3.3 (---) tags 56742 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 26 23:27:31 2022 Received: (at 56742) by debbugs.gnu.org; 27 Jul 2022 03:27:31 +0000 Received: from localhost ([127.0.0.1]:54804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGXhr-0002IE-HV for submit@debbugs.gnu.org; Tue, 26 Jul 2022 23:27:31 -0400 Received: from mail-ed1-f52.google.com ([209.85.208.52]:44696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGXhp-0002I0-Pw for 56742@debbugs.gnu.org; Tue, 26 Jul 2022 23:27:30 -0400 Received: by mail-ed1-f52.google.com with SMTP id i13so10713444edj.11 for <56742@debbugs.gnu.org>; Tue, 26 Jul 2022 20:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=dP/fChOxhQbayycasAUkF88x/1UK7Taw3gCDE+viXKs=; b=b60o4eOF7XdLgLOHjwTwmVh1egfQWjX70MxW9lBjk9kGgH2Q0dH9/iIDjoqr9CCPGq qeWeHNaJo8gPdpucN2fvajkfThn4Py3OaoF8R2wHI0AvFcWpgtp3TCl6q0PZgdQlbR/y Cmp6rmwQldYOM2YTNAh1a0+zvzfEKke4661791XqJpBsiNDblKLXT/zpNShJuIOr80W4 3IagQWwlNRoknXpgWDRXns1mQc06EJvzdzduYnh6GQ+W2Dx3UAuTuxSbZICPOEhcaqiW WOoQ3lYVdSJ3ZGN9oeeMSG7dd3YJa0m4Xp+hjpM90IxliDX4qK/Q9libmzCw8PUL2qp/ Bi5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=dP/fChOxhQbayycasAUkF88x/1UK7Taw3gCDE+viXKs=; b=PXYYOTea+I+q4ArURAzN4kw0VR32oQnKjEp01fjyFqiTKHZnLj7RR4uwIizchB0gEy FpuVCiwr+J8o615hdJ/86yCvnMjDzIwgciPrJvXbag2WnWht+jE5FEXH2kh8tlHpCsyU H8wGHoB+sqzBjfzUum0dBH9+rrD/HbzArSLiEpdCccttfHfJ8/0FqESV9Vjaikr5bq0p B5u7pl/r0ehnrQczcqN2RIoupIL7QAwfzbf+1uvtzXGpWRIjI3SXKh400QrfQaL3VjRK 9BXRaG4KwXc7mzitYFToaCVCLOiR/wESlvtGUNM6ZqhsnDmuTiygImKQ1j1/+Y7Vr+t4 h1SQ== X-Gm-Message-State: AJIora8i1B+4vTpC7dVsWnqE884Zv+kda8EluIc79hWbnDH14Zg9hvwx Bym/iYZaM3Q6yrE63X374hrRfAQcR7ZeHTvXx3U= X-Google-Smtp-Source: AGRyM1vRMZ46dRibXuIN0U5VW1u+ozUUVUsZnX5mVcO1hFjRi1devs+qwd1C+SUZ35QSBVzRRbKsT9v2e4YuC+/Z338= X-Received: by 2002:a05:6402:1102:b0:43a:9cf7:68a3 with SMTP id u2-20020a056402110200b0043a9cf768a3mr21213905edv.68.1658892442665; Tue, 26 Jul 2022 20:27:22 -0700 (PDT) MIME-Version: 1.0 References: <871qualdod.fsf@gmx.net> <87sfmo11gm.fsf@gnus.org> In-Reply-To: <87sfmo11gm.fsf@gnus.org> From: kobarity Date: Wed, 27 Jul 2022 12:27:09 +0900 Message-ID: Subject: Re: bug#56742: 29.0.50; Python indendation problem after comment To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 56742 Cc: Stephen Berman , 56742@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 (-) Hello Stephen and Lars, Lars Ingebrigtsen wrote: > > Stephen Berman writes: > > > The attached patch prevents the wrong dedenting, but I'm not familiar > > enough with the python.el code to be confident it's the correct fix. > > Perhaps Kobarity has some comments; added to the CCs. I'm not so familiar with this part of python.el, but it looks good to me. How about modifying the ERT to address this issue? diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 3b10bde23b..3828d4d5aa 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -1108,6 +1108,7 @@ python-indent-dedenters-2 except Exception: if hide_details: logger.exception('Unhandled exception') + # comment else finally: data.free() From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 27 05:39:15 2022 Received: (at 56742) by debbugs.gnu.org; 27 Jul 2022 09:39:15 +0000 Received: from localhost ([127.0.0.1]:55170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGdVb-0005B2-Bo for submit@debbugs.gnu.org; Wed, 27 Jul 2022 05:39:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGdVZ-0005AZ-Ms for 56742@debbugs.gnu.org; Wed, 27 Jul 2022 05:39:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tO9o8DchyXO+BpnzkLjQnO39PUwfZWGOJVwdtQprdh4=; b=A2FhT00PawUgOCFLPMy2R660sQ 4V2pKFLuTK8tXrThmbXUoAm4fdTpWtwvIyuXiAuRMr6gvN3VKk1PbCK0RxyTYo1kdAD5YsDt7P90Y 5c24U+qLmf7z3FidyIxXJAaDrVM/3O6TBdWZqoeApYqk4dacG+zqN7jDokiV8VzootY8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGdVR-0006FF-Bm; Wed, 27 Jul 2022 11:39:07 +0200 From: Lars Ingebrigtsen To: kobarity Subject: Re: bug#56742: 29.0.50; Python indendation problem after comment In-Reply-To: (kobarity@gmail.com's message of "Wed, 27 Jul 2022 12:27:09 +0900") References: <871qualdod.fsf@gmx.net> <87sfmo11gm.fsf@gnus.org> X-Now-Playing: Simple Minds's _Sister Feelings Call_: "Sound in 70 Cities" Date: Wed, 27 Jul 2022 11:39:04 +0200 Message-ID: <87pmhqzyh3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: kobarity writes: > I'm not so familiar with this part of python.el, but it looks good to me. Thanks; I've now applied Stephen's patch to Emacs 29. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56742 Cc: Stephen Berman , 56742@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: -3.3 (---) kobarity writes: > I'm not so familiar with this part of python.el, but it looks good to me. Thanks; I've now applied Stephen's patch to Emacs 29. > How about modifying the ERT to address this issue? > > diff --git a/test/lisp/progmodes/python-tests.el > b/test/lisp/progmodes/python-tests.el > index 3b10bde23b..3828d4d5aa 100644 > --- a/test/lisp/progmodes/python-tests.el > +++ b/test/lisp/progmodes/python-tests.el > @@ -1108,6 +1108,7 @@ python-indent-dedenters-2 > except Exception: > if hide_details: > logger.exception('Unhandled exception') > + # comment > else > finally: > data.free() And I added a new test that does this (so that we have a test both with and without the #comment). From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 27 05:39:21 2022 Received: (at control) by debbugs.gnu.org; 27 Jul 2022 09:39:21 +0000 Received: from localhost ([127.0.0.1]:55173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGdVg-0005BM-M1 for submit@debbugs.gnu.org; Wed, 27 Jul 2022 05:39:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGdVe-0005As-PM for control@debbugs.gnu.org; Wed, 27 Jul 2022 05:39:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OFSCSA3bwMDPBUkYlqk4rg/vero4Cpw/S+8CACUf90c=; b=MNTp0wmbrOQ8cPBS7jqDGjJfIb PO7ADkJPY/bjDElsbWN5AieUdxE4wjXgHAhZKo3j3ZvBiHS2ioPknm5p/2CR0RJJRyu58a9GvYGIJ UpcOt/HwOU7OB4YhyeXHPiklJjVaQrrLQ73wIy1TQxgKz9uFSklaFHwAHV4ngFrb+D3I=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGdVX-0006FR-3C for control@debbugs.gnu.org; Wed, 27 Jul 2022 11:39:13 +0200 Date: Wed, 27 Jul 2022 11:39:10 +0200 Message-Id: <87o7xazygx.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #56742 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 56742 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -3.3 (---) close 56742 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 27 14:01:12 2022 Received: (at 56742) by debbugs.gnu.org; 27 Jul 2022 18:01:12 +0000 Received: from localhost ([127.0.0.1]:56952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGlLM-0003yJ-9R for submit@debbugs.gnu.org; Wed, 27 Jul 2022 14:01:12 -0400 Received: from mout.gmx.net ([212.227.17.21]:55399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGlLK-0003y4-5k for 56742@debbugs.gnu.org; Wed, 27 Jul 2022 14:01:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1658944862; bh=GsNsZYTT9MPwFNrFryeH9FZ7f7fkzeGQtRlSIGZiqnk=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=dAAH2unjNtNKq+0qD6c47unyEYFwLhohaZ/NcNQesrsMlHf5znuL9JJNE51MX0Wfn sKJolFwmqc0hdoU54A2MWQ6M1bnVrSxW1fnRDo35BySrFCxpcR1uI9mxUO3EMEon9Z K+FsJYRD830HbDgZFcYpgUpRi19YFAnH5I2R+y5s= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs2 ([89.246.38.131]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1OXT-1nJfVt0eol-012lOm; Wed, 27 Jul 2022 20:01:02 +0200 From: Stephen Berman To: Lars Ingebrigtsen Subject: Re: bug#56742: 29.0.50; Python indendation problem after comment In-Reply-To: <87pmhqzyh3.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 27 Jul 2022 11:39:04 +0200") References: <871qualdod.fsf@gmx.net> <87sfmo11gm.fsf@gnus.org> <87pmhqzyh3.fsf@gnus.org> Date: Wed, 27 Jul 2022 20:01:01 +0200 Message-ID: <87ilniph9e.fsf@rub.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:RSei3iwOs+Z7KID5zckuxfbRNF+j03cQ5zsfVPD1yK5CwHhDlR1 +PjjL0Dqz7g43bfrQVtoXp4nUM5UbKCLienaL06K50K14U7wn9k0yeLDYlOYI8nZm8flQz5 FqdtRChW0Z+YRZZSXHAr2QaIVRWDsRUEbwcIE43sxD/80JsfwTOfgNqOW6AMs8ya1ouwCwq ej30KVd1OkPrfEpPmxOug== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:oC+/INXxc6E=:y4buBjv0k9MYgWdQ5Svkw3 dJ2lv2YZ3be7AE5gf0oyA9xM09xmV+ZHxsFcZK9FcBS5RGPjW/re5/m3WOHQlD+4E7X10A24r Ukz9uomt7bfzfBTaHlA3yn+oB8YzO93+czk0vLUyj7CoqUoaoQMbbu/sl9TMwBzZBHiYtISeI 8VizZzwtPPJhKNaLcUZrY1SJGUsXV/xPivMnJhZPE6P3nSLp7Ey0Ob6JDXOkSFOjs0KImzbCD HlHslQ93D29wff7J6/6SI4HffTRYDk9qsoF5G8vVAJiX8+uHrwNEdDqubFOXdGbQqn0MidTXr LO1OQoGjApkQ+HRUn+RAXNZM3Sr5B3kA5siBiYcl7GsKTshapMYGfsN+6AsKj9fJ7e3l+AAzS DVXecYkRUeYNbdL+oIjcgcszba8NV2yizYgYAyOUGcESAQY3FdRu0pYoNW/2GZqoOatJWt9x8 yWNEqYLe/3Gdo+Ukfx3pDSBWfk60Gg44lvn3ODlqBn1ZTxrnYqUzKYxXqS1aq0veXV9Amlqr1 DZNiFZKCc07C7thA9fdkHg8BObhxyZlkObSc36SQapPBBWcB4ncigcB/zuu1VFvmlgADJEq/X tMWzNHigVDm/+lAXuVMq8EmgsHeVWCwdY9FG85HcBwpEG7+w2zHJNuzPGvhsSwpoisA+yyDy+ /KNv/OPkdOdO34yYrTRiOkQg9LFkRfNb2JRLtFbLw6+ETf5GFnksUfvA8WMwb0lxUl/AjOP8x BCpynLpLmp9rZz0N9VP7IZmnmk7xBDIRQiah0KAZWVHs+ABmnTkEW8El6qdIrD7I7chZDs3Lg QSOC9d0sKQxfrZ2Y1gS5DCfOrd+oEl7TvXG4iROE7EnGJhQY3qAgzucErV+PuOnxNMh1429NN kO8+KhBAnyMIAmDeJUCzwxZ2yqjUDYIN3X9SlXUyqvyo/xTVARrtGengTW0hibhzyykb5B0mN vFQSBJKa7Sbt3B3XysBcVa+Y40ar6rOU2Aj99a0a8k+IOazXO5dIXdpnm2M6vnkMdUd1Klh1w G5O7ffS5Hx3zlnB2bEt+glD82bgH0eZltRLW6KtdijIUYsIF5PTRu58/oRaOiNjADd0q9Lk2B UHNkIugPqd66IXkv3EBQju8sotV0/NYsUDMMWCQ1XoMqmTLQX2erJFSCA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56742 Cc: kobarity , 56742@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.7 (-) On Wed, 27 Jul 2022 11:39:04 +0200 Lars Ingebrigtsen wrote: > kobarity writes: > >> I'm not so familiar with this part of python.el, but it looks good to me. > > Thanks; I've now applied Stephen's patch to Emacs 29. Thanks! >> How about modifying the ERT to address this issue? >> >> diff --git a/test/lisp/progmodes/python-tests.el >> b/test/lisp/progmodes/python-tests.el >> index 3b10bde23b..3828d4d5aa 100644 >> --- a/test/lisp/progmodes/python-tests.el >> +++ b/test/lisp/progmodes/python-tests.el >> @@ -1108,6 +1108,7 @@ python-indent-dedenters-2 >> except Exception: >> if hide_details: >> logger.exception('Unhandled exception') >> + # comment >> else >> finally: >> data.free() > > And I added a new test that does this (so that we have a test both with > and without the #comment). And thanks for that too. Steve Berman From unknown Fri Jun 20 18:13:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Aug 2022 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator