GNU bug report logs - #57262
29.0.50; Python indentation problem of block continuation

Previous Next

Package: emacs;

Reported by: kobarity <kobarity <at> gmail.com>

Date: Wed, 17 Aug 2022 14:16:02 UTC

Severity: normal

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57262 in the body.
You can then email your comments to 57262 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57262; Package emacs. (Wed, 17 Aug 2022 14:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to kobarity <kobarity <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 17 Aug 2022 14:16:02 GMT) Full text and rfc822 format available.

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

From: kobarity <kobarity <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Python indentation problem of block continuation
Date: Wed, 17 Aug 2022 23:14:44 +0900
[Message part 1 (text/plain, inline)]
Hi,

When you type the following code in the Python mode buffer and hit
Enter key, the next line will be indented with 4 spaces (assuming
`python-indent-offset' is 4).

#+begin_src python
for long_variable_name \
#+end_src

However, it is not appropriate because it will be "continuation line
with same indent as next logical line" error.  The indentation should
be one level deeper as follows:

#+begin_src python
for long_variable_name \
        in (1, 2):
    print(long_variable_name)
#+end_src

Attached is a patch to fix this issue.

Best Regards,

--

In GNU Emacs 29.0.50 (build 10, x86_64-pc-linux-gnu)
 of 2022-08-15 built on ubuntu
System Description: Ubuntu 22.04.1 LTS

Configured using:
 'configure --without-x --with-gnutls=ifavailable'

Configured features:
ACL LIBXML2 MODULES NOTIFY INOTIFY PDUMPER SECCOMP SOUND SQLITE3 THREADS
XIM ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dnd dired-loaddefs rfc822 mml mml-sec password-cache epa epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils python skeleton
derived json map rx cl-macs pcase subr-x comint regexp-opt ring
cl-loaddefs cl-lib ansi-color term/screen term/xterm xterm byte-opt gv
bytecomp byte-compile cconv rmc iso-transl tooltip eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads inotify multi-tty
make-network-process emacs)

Memory information:
((conses 16 70922 6831)
 (symbols 48 7269 0)
 (strings 32 19447 1974)
 (string-bytes 1 607324)
 (vectors 16 10328)
 (vector-slots 8 124429 7979)
 (floats 8 29 517)
 (intervals 56 210 0)
 (buffers 992 13))
[fix-indentation.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57262; Package emacs. (Thu, 18 Aug 2022 13:17:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: kobarity <kobarity <at> gmail.com>
Cc: 57262 <at> debbugs.gnu.org
Subject: Re: bug#57262: 29.0.50; Python indentation problem of block
 continuation
Date: Thu, 18 Aug 2022 15:16:27 +0200
kobarity <kobarity <at> gmail.com> writes:

> Attached is a patch to fix this issue.

Thanks; pushed to Emacs 29.





bug marked as fixed in version 29.1, send any further explanations to 57262 <at> debbugs.gnu.org and kobarity <kobarity <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 18 Aug 2022 13:17:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 16 Sep 2022 11:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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