all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17670: 24.3.90.1; no indent from C-j in Python shell
@ 2014-06-02 16:01 Andreas Röhler
  2014-06-02 17:11 ` Andreas Röhler
  2014-06-02 18:15 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Andreas Röhler @ 2014-06-02 16:01 UTC (permalink / raw)
  To: 17670

emacs -Q

M-x run-python

Insert at prompt: "if True:"

C-j should indent but goes to BOL

Running fails as expected:


Python 2.7.3 (default, Mar 14 2014, 11:57:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> if True:
print(45)
...   File "<stdin>", line 2
     print(45)
         ^
IndentationError: expected an indented block
 >>>


;;;;;;;;;;;;;;;;

In GNU Emacs 24.3.90.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
  of 2014-04-24

Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux 7.5 (wheezy)

Important settings:
   value of $LANG: de_DE.utf8
   locale-coding-system: utf-8-unix

Major mode: Inferior Python

Minor modes in effect:
   compilation-shell-minor-mode: t
   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
   transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <options> <menu-set-font>
C-d C-g C-y C-d C-g C-x C-f <M-backspace> <M-backspace>
<M-backspace> <M-backspace> <M-backspace> e y p . p
y <return> M-x r u n - p y t h o n <return> C-x 1 C-g
C-h k <tab> C-x o <down> <down> <down> <left> <down>
<down> <left> <left> <left> <left> <left> <return>
C-x 1 <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <up> <left> <left> <left>
<help-echo> <help-echo> <help-echo> M-+ C-x b * P <tab>
<return> C-h f p y t h o n - c o m <tab> <M-backspace>
i n <tab> d <tab> c a <tab> i n <tab> <return> C-x
o <down> <down> <right> <return> <down> C-x 1 M-x e
d e b u g - d e f <tab> <return> C-x b <return> C-x
b * P <tab> <return> p r i t <backspace> n t ( 3 4
) C-j C-h k C-j C-h v i n d e n t - l i n e - f u <tab>
<return> C-h f i n d e n t - r e <tab> l <tab> <return>
i d <backspace> d <backspace> i <backspace> f SPC R
e u <backspace> <backspace> <backspace> T r u e : C-j
<up> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> C-e C-j p r o <backspace> i n t SPC <backspace>
( 4 5 ) <return> C-x 1 <up> <up> <up> <up> <up> <up>
C-SPC C-e M-w <help-echo> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> M-x r e p o r t - e m <tab>
<return>

Recent messages:
M-+ is undefined
Making completion list... [2 times]
Type C-x 1 to delete the help window.
Edebug: python-indent-calculate-indentation
Compiler-macro error for python-syntax-context: (void-function python-syntax--context-compiler-macro) [2 times]
python-indent-calculate-indentation
Type C-x 1 to delete the help window, C-M-v to scroll help.

Making completion list...


Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message 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
mail-prsvr mail-utils pcase edebug cl-loaddefs cl-lib find-func help-fns
help-mode compile python easymenu comint ring ansi-color time-date
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
inotify dynamic-setting x-toolkit x multi-tty emacs)

Memory information:
((conses 8 126368 6172)
  (symbols 24 36990 0)
  (miscs 20 60 244)
  (strings 16 50063 4936)
  (string-bytes 1 725002)
  (vectors 8 11772)
  (vector-slots 4 411801 5684)
  (floats 8 69 355)
  (intervals 28 570 9)
  (buffers 512 17)
  (heap 1024 32795 466))





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

* bug#17670: 24.3.90.1; no indent from C-j in Python shell
  2014-06-02 16:01 bug#17670: 24.3.90.1; no indent from C-j in Python shell Andreas Röhler
@ 2014-06-02 17:11 ` Andreas Röhler
  2014-06-02 18:15 ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Röhler @ 2014-06-02 17:11 UTC (permalink / raw)
  To: 17670

also in

In GNU Emacs 24.3.91.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
  of 2014-05-12





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

* bug#17670: 24.3.90.1; no indent from C-j in Python shell
  2014-06-02 16:01 bug#17670: 24.3.90.1; no indent from C-j in Python shell Andreas Röhler
  2014-06-02 17:11 ` Andreas Röhler
@ 2014-06-02 18:15 ` Stefan Monnier
  2014-06-02 20:02   ` Andreas Röhler
  2014-06-03  4:32   ` Glenn Morris
  1 sibling, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2014-06-02 18:15 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 17670

> emacs -Q
> M-x run-python
> Insert at prompt: "if True:"
> C-j should indent but goes to BOL

C-j doesn't indent in "emacs -Q".  RET does instead.


        Stefan





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

* bug#17670: 24.3.90.1; no indent from C-j in Python shell
  2014-06-02 18:15 ` Stefan Monnier
@ 2014-06-02 20:02   ` Andreas Röhler
  2014-06-02 23:56     ` Stefan Monnier
  2014-06-03  4:32   ` Glenn Morris
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Röhler @ 2014-06-02 20:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17670

On 02.06.2014 20:15, Stefan Monnier wrote:
>> emacs -Q
>> M-x run-python
>> Insert at prompt: "if True:"
>> C-j should indent but goes to BOL
>
> C-j doesn't indent in "emacs -Q".  RET does instead.
>
>
>          Stefan
>

So the defaults are switched?
Don't think it's a good idea.

RET is that basic...
If beginners don't get a simple newline, that might turn bad.

Andreas





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

* bug#17670: 24.3.90.1; no indent from C-j in Python shell
  2014-06-02 20:02   ` Andreas Röhler
@ 2014-06-02 23:56     ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2014-06-02 23:56 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 17670-done

> If beginners don't get a simple newline, that might turn bad.

It might.  Time will tell.


        Stefan





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

* bug#17670: 24.3.90.1; no indent from C-j in Python shell
  2014-06-02 18:15 ` Stefan Monnier
  2014-06-02 20:02   ` Andreas Röhler
@ 2014-06-03  4:32   ` Glenn Morris
  1 sibling, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2014-06-03  4:32 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17670

Stefan Monnier wrote:

>> emacs -Q
>> M-x run-python
>> Insert at prompt: "if True:"
>> C-j should indent but goes to BOL
>
> C-j doesn't indent in "emacs -Q".  RET does instead.

But RET does not seem to indent in the situation described here?
Ie, in inferior python buffers.
(Neither C-j nor RET ever has, AFAICS.)

It seems to work with RET if you set python-shell-interpreter to ipython,
but I think that's ipython doing it, not Emacs.

Maybe Emacs should be able to make it work with plain python?





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

end of thread, other threads:[~2014-06-03  4:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 16:01 bug#17670: 24.3.90.1; no indent from C-j in Python shell Andreas Röhler
2014-06-02 17:11 ` Andreas Röhler
2014-06-02 18:15 ` Stefan Monnier
2014-06-02 20:02   ` Andreas Röhler
2014-06-02 23:56     ` Stefan Monnier
2014-06-03  4:32   ` Glenn Morris

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.