GNU bug report logs - #18432
24.4.50; python-mode, elif line indentation

Previous Next

Package: emacs;

Reported by: Sho Takemori <stakemorii <at> gmail.com>

Date: Tue, 9 Sep 2014 15:42:02 UTC

Severity: normal

Tags: patch

Found in version 24.4

Fixed in version 24.4.50

Done: fgallina <at> gnu.org (Fabián Ezequiel Gallina)

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 18432 in the body.
You can then email your comments to 18432 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#18432; Package emacs. (Tue, 09 Sep 2014 15:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sho Takemori <stakemorii <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 09 Sep 2014 15:42:02 GMT) Full text and rfc822 format available.

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

From: Sho Takemori <stakemorii <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; python-mode, elif line indentation
Date: Tue, 09 Sep 2014 20:30:44 +0900
Dear developers,

In a Python buffer, I have the following code.
Here _ indicates the position of the cursor.

if (a == 1 or
    a == 2):
    pass
elif (a == 3 or_a == 4):

When I press C-m, then this code becomes as follows:

if (a == 1 or
    a == 2):
    pass
elif (a == 3 or
a == 4):

I expected the following:

if (a == 1 or
    a == 2):
    pass
elif (a == 3 or
      a == 4):

Also I cannot change the indent level at the final line by TAB.

This may not be a bug.
But the 4th line and 5th line lack the compatibility with
the 1st line and the 2nd line.

Best Regards,
Sho Takemori



In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
 of 2014-09-01 on K430-linux
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:    Ubuntu 14.04.1 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GCONF GSETTINGS NOTIFY LIBXML2
FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LC_MONETARY: ja_JP.UTF-8
  value of $LC_NUMERIC: ja_JP.UTF-8
  value of $LC_TIME: ja_JP.UTF-8
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
C-x b a a <return> M-x p y t h o n - m o d e <return>
i f SPC ( ) <left> a SPC = = SPC 1 SPC o r SPC a SPC
= = SPC 2 <right> : <left> <left> <left> <left> <left>
<left> <left> <left> <left> <return> <right> <right>
<right> <right> <right> C-e <return> p a s s <return>
e l i f SPC ( ) <left> a SPC = = SPC 3 SPC o r SPC
a SPC = = SPC 4 <right> : <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <right> <return>
TAB TAB TAB M-x r e p o r TAB RET

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Can't guess python-indent-offset, using defaults: 4
Closes if (a == 1 or [5 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils python easymenu json comint ring
cl-loaddefs cl-lib ansi-color time-date japan-util tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 85419 8164)
 (symbols 48 18988 0)
 (miscs 40 42 124)
 (strings 32 13521 4707)
 (string-bytes 1 398319)
 (vectors 16 11417)
 (vector-slots 8 480329 22421)
 (floats 8 70 275)
 (intervals 56 209 6)
 (buffers 976 12)
 (heap 1024 35387 982))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18432; Package emacs. (Tue, 09 Sep 2014 16:02:01 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#18432: 24.4.50; python-mode, elif line indentation
Date: Tue, 09 Sep 2014 18:00:23 +0200
On 09.09.2014 13:30, Sho Takemori wrote:
> Dear developers,
>
> In a Python buffer, I have the following code.
> Here _ indicates the position of the cursor.
>
> if (a == 1 or
>      a == 2):
>      pass
> elif (a == 3 or_a == 4):
>
> When I press C-m, then this code becomes as follows:
>
> if (a == 1 or
>      a == 2):
>      pass
> elif (a == 3 or
> a == 4):
>
> I expected the following:
>
> if (a == 1 or
>      a == 2):
>      pass
> elif (a == 3 or
>        a == 4):
>
> Also I cannot change the indent level at the final line by TAB.
>
> This may not be a bug.
> But the 4th line and 5th line lack the compatibility with
> the 1st line and the 2nd line.
>

IMO it is a bug.

May confirm that with

GNU Emacs 24.3.93.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2014-08-15

Andreas






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18432; Package emacs. (Thu, 30 Oct 2014 19:19:01 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: 18432 <at> debbugs.gnu.org
Cc: fgallina <at> gnu.org
Date: Thu, 30 Oct 2014 16:18:12 -0300
This is a duplicate of my own report #18796 (and of #18843).

Take a look at that report for a very simple fix.

Hope it gets commited soon.




Merged 18432 18796 18843. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 31 Oct 2014 16:39:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Carlos Pita <carlosjosepita <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 05 Nov 2014 20:36:02 GMT) Full text and rfc822 format available.

Disconnected #18843 from all other report(s). Request was from fgallina <at> gnu.org (Fabián Ezequiel Gallina) to control <at> debbugs.gnu.org. (Sat, 15 Nov 2014 21:17:02 GMT) Full text and rfc822 format available.

Disconnected #18432 from all other report(s). Request was from fgallina <at> gnu.org (Fabián Ezequiel Gallina) to control <at> debbugs.gnu.org. (Sat, 15 Nov 2014 21:27:02 GMT) Full text and rfc822 format available.

Reply sent to fgallina <at> gnu.org (Fabián Ezequiel Gallina):
You have taken responsibility. (Sat, 15 Nov 2014 22:05:02 GMT) Full text and rfc822 format available.

Notification sent to Sho Takemori <stakemorii <at> gmail.com>:
bug acknowledged by developer. (Sat, 15 Nov 2014 22:05:03 GMT) Full text and rfc822 format available.

Message #24 received at 18432-done <at> debbugs.gnu.org (full text, mbox):

From: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
To: 18432-done <at> debbugs.gnu.org
Subject: 24.4.50; python-mode, elif line indentation
Date: Sat, 15 Nov 2014 19:04:05 -0300
Fixed at 92f5857 in the emacs-24 branch.


Thanks,
Fabián




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 14 Dec 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 193 days ago.

Previous Next


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