unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18432: 24.4.50; python-mode, elif line indentation
@ 2014-09-09 11:30 Sho Takemori
  2014-09-09 16:00 ` Andreas Röhler
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sho Takemori @ 2014-09-09 11:30 UTC (permalink / raw)
  To: 18432

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))






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18432: 24.4.50; python-mode, elif line indentation
  2014-09-09 11:30 bug#18432: 24.4.50; python-mode, elif line indentation Sho Takemori
@ 2014-09-09 16:00 ` Andreas Röhler
  2014-10-30 19:18 ` bug#18432: Carlos Pita
  2014-11-15 22:04 ` bug#18432: 24.4.50; python-mode, elif line indentation Fabián Ezequiel Gallina
  2 siblings, 0 replies; 4+ messages in thread
From: Andreas Röhler @ 2014-09-09 16:00 UTC (permalink / raw)
  To: 18432

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







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18432:
  2014-09-09 11:30 bug#18432: 24.4.50; python-mode, elif line indentation Sho Takemori
  2014-09-09 16:00 ` Andreas Röhler
@ 2014-10-30 19:18 ` Carlos Pita
  2014-11-15 22:04 ` bug#18432: 24.4.50; python-mode, elif line indentation Fabián Ezequiel Gallina
  2 siblings, 0 replies; 4+ messages in thread
From: Carlos Pita @ 2014-10-30 19:18 UTC (permalink / raw)
  To: 18432

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18432: 24.4.50; python-mode, elif line indentation
  2014-09-09 11:30 bug#18432: 24.4.50; python-mode, elif line indentation Sho Takemori
  2014-09-09 16:00 ` Andreas Röhler
  2014-10-30 19:18 ` bug#18432: Carlos Pita
@ 2014-11-15 22:04 ` Fabián Ezequiel Gallina
  2 siblings, 0 replies; 4+ messages in thread
From: Fabián Ezequiel Gallina @ 2014-11-15 22:04 UTC (permalink / raw)
  To: 18432-done


Fixed at 92f5857 in the emacs-24 branch.


Thanks,
Fabián





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-15 22:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 11:30 bug#18432: 24.4.50; python-mode, elif line indentation Sho Takemori
2014-09-09 16:00 ` Andreas Röhler
2014-10-30 19:18 ` bug#18432: Carlos Pita
2014-11-15 22:04 ` bug#18432: 24.4.50; python-mode, elif line indentation Fabián Ezequiel Gallina

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).