GNU bug report logs - #63959
python-mode does not keep indentation in square brackets []

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Thu, 8 Jun 2023 09:40:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Subject: bug#63959: closed (Re: bug#63959: python-mode does not keep
 indentation in square brackets [])
Date: Sat, 24 Jun 2023 12:15:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#63959: python-mode does not keep indentation in square brackets []

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 63959 <at> debbugs.gnu.org.

-- 
63959: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63959
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Cc: 63959-done <at> debbugs.gnu.org, kobarity <at> gmail.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#63959: python-mode does not keep indentation in square
 brackets []
Date: Sat, 24 Jun 2023 15:14:07 +0300
> From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
> Cc: 63959 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Sun, 18 Jun 2023 18:20:25 +0300
> 
> > It would be helpful if you could try this patch.
> 
> Thank you, tested, works for me!

Thanks for testing.  I've now installed this on the master branch, and
I'm marking the bug done.

[Message part 3 (message/rfc822, inline)]
From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: python-mode does not keep indentation in square brackets []
Date: Thu, 08 Jun 2023 12:39:23 +0300
Usually in programming modes, when previous indentation is kind of "special",
the new lines should keep the indentation from the previous line. However, it
doesn't work in this case.


# Steps to reproduce

1. Create file `test.py` with following content:

    for infix in [ # some description
                  "_cdata", "_cmeta", "_corig", "_cpool", "_cvol", "_wcorig",
                  "indentation is broken here", "bar"]:
        print(infix)

2. Open it as `emacs -Q test.py`
3. Put a caret on the 3rd line (which says "indentation is broken"
4. Press TAB


## Expected

Indentation won't change

## Actual

The line goes back by 4 spaces or so

# Additional information

emacs version: compiled from latest git a week ago, commit 5cace109d2b



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

Previous Next


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