unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Konstantin Kharlamov <hi-angel@yandex.ru>, kobarity <kobarity@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 63959@debbugs.gnu.org
Subject: bug#63959: python-mode does not keep indentation in square brackets []
Date: Fri, 09 Jun 2023 14:21:24 +0300	[thread overview]
Message-ID: <83mt18285n.fsf@gnu.org> (raw)
In-Reply-To: <0a9099c91a3cd323c78e08fb6263d11fe66429bb.camel@yandex.ru> (message from Konstantin Kharlamov on Thu, 08 Jun 2023 12:39:23 +0300)

> From: Konstantin Kharlamov <hi-angel@yandex.ru>
> 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

kobarity, any comments?





  reply	other threads:[~2023-06-09 11:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08  9:39 bug#63959: python-mode does not keep indentation in square brackets [] Konstantin Kharlamov
2023-06-09 11:21 ` Eli Zaretskii [this message]
2023-06-09 14:35   ` kobarity
2023-06-18 14:56     ` kobarity
2023-06-18 15:20       ` Konstantin Kharlamov
2023-06-19  8:46         ` Andreas Röhler
2023-06-24 12:37           ` kobarity
2023-06-28  6:58             ` Andreas Röhler
2023-07-01 13:42               ` kobarity
2023-07-01 13:57                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-24 12:14         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mt18285n.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63959@debbugs.gnu.org \
    --cc=hi-angel@yandex.ru \
    --cc=kobarity@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).