GNU bug report logs - #56742
29.0.50; Python indendation problem after comment

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Sun, 24 Jul 2022 15:44:01 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 56742 <at> debbugs.gnu.org (full text, mbox):

From: kobarity <kobarity <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Stephen Berman <stephen.berman <at> gmx.net>, 56742 <at> debbugs.gnu.org
Subject: Re: bug#56742: 29.0.50; Python indendation problem after comment
Date: Wed, 27 Jul 2022 12:27:09 +0900
Hello Stephen and Lars,

Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> Stephen Berman <stephen.berman <at> gmx.net> 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()




This bug report was last modified 2 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.