all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25363: 24.5; ipython integration
@ 2017-01-05  1:20 Georges Dupret
  2017-01-05  1:41 ` Clément Pit--Claudel
  2017-01-11 16:08 ` Andreas Röhler
  0 siblings, 2 replies; 4+ messages in thread
From: Georges Dupret @ 2017-01-05  1:20 UTC (permalink / raw)
  To: 25363

The ipython interpretor called within emacs does not handle identation
properly. The following happens when hitting return:

In [5]: for x in range(3):
   File "<ipython-input-5-782f5b7cd5c6>", line 1
     for x in range(3):
                       ^
SyntaxError: unexpected EOF while parsing

Note that I have to set this in .emacs otherwise I get bad characters:
(setq python-shell-interpreter-args " --simple-prompt --pprint")

Best,
ged



In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
  of 2016-04-17 on lgw01-04, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11804000
System Description:    Ubuntu 16.04.1 LTS

Configured using:
  `configure --build x86_64-linux-gnu --prefix=/usr
  --sharedstatedir=/var/lib --libexecdir=/usr/lib
  --localstatedir=/var/lib --infodir=/usr/share/info
  --mandir=/usr/share/man --with-pop=yes
  --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
  --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
  --libexecdir=/usr/lib --localstatedir=/var/lib
  --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
  --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
  --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
  'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
  -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
  -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

Major mode: Inferior Python

Minor modes in effect:
   shell-dirtrack-mode: t
   pyvenv-mode: t
   yas-global-mode: t
   yas-minor-mode: t
   show-paren-mode: t
   global-linum-mode: t
   linum-mode: t
   TeX-PDF-mode: t
   compilation-shell-minor-mode: t
   tooltip-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent messages:
Beginning of buffer [4 times]
Loading /home/ged/.emacs...
[yas] Prepared just-in-time loading of snippets successfully.
Loading /home/ged/.emacs...done
Missing module docstring [missing-docstring]
Can't guess python-indent-offset, using defaults: 4
Sent: #!/usr/bin/env python...
Removed if __main__ == '__main__' construct, use a prefix argument to 
evaluate.
Missing module docstring [missing-docstring]
Making completion list...

Load-path shadows:
/usr/share/emacs/24.5/site-lisp/debian-startup hides 
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides 
/usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/site-lisp/rst hides 
/usr/share/emacs/24.5/lisp/textmodes/rst
/usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides 
/usr/share/emacs/24.5/lisp/language/thai-word

Features:
(shadow sort mail-extr emacsbug sendmail pylint company-oddmuse
company-keywords company-etags company-gtags company-dabbrev-code
company-dabbrev company-files company-cmake company-xcode company-clang
company-eclim company-template company-css company-nxml company-bbdb
make-mode ffap thingatpt tramp-sh tramp-cache tramp tramp-compat
tramp-loaddefs trampver shell ibuf-ext ibuffer conf-mode vc-git
vc-dispatcher vc-svn org-element org-rmail org-mhe org-irc org-info
org-gnus org-docview doc-view jka-compr image-mode dired org-bibtex
bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete
pcomplete org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu
calendar cal-loaddefs ein py-autopep8 flycheck rx subr-x seq seq-24 dash
highlight-indentation flymake eldoc company pcase elpy pyvenv
elpy-refactor python json grep files-x etags cus-edit cus-start cus-load
wid-edit yasnippet help-mode paren saveplace ido linum leuven-theme ert
find-func ewoc debug timezone texinfo toolbar-x prv-emacs reporter
desktop frameset context plain-tex tex-buf latex derived edmacro kmacro
tex-ispell tex-style tex easy-mmode dbus xml crm advice cl-macs warnings
cl gv compile comint ansi-color ring info tex-site autoload lisp-mnt
tar-mode misearch multi-isearch mule-util mm-archive message format-spec
rfc822 mml easymenu mml-sec mailabbrev gmm-utils mailheader mm-decode
mm-bodies mm-encode mail-utils network-stream starttls url-http tls
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source eieio
byte-opt bytecomp byte-compile cl-extra cl-loaddefs cl-lib cconv
eieio-core gnus-util mm-util help-fns mail-prsvr password-cache url-vars
epg finder-inf package epg-config server 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
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 446245 90722)
  (symbols 48 48335 1131)
  (miscs 40 1350 577)
  (strings 32 120840 31866)
  (string-bytes 1 3373699)
  (vectors 16 42217)
  (vector-slots 8 883306 34522)
  (floats 8 1134 273)
  (intervals 56 2275 1303)
  (buffers 960 26)
  (heap 1024 74635 5094))






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

* bug#25363: 24.5; ipython integration
  2017-01-05  1:20 bug#25363: 24.5; ipython integration Georges Dupret
@ 2017-01-05  1:41 ` Clément Pit--Claudel
  2017-01-06 20:47   ` Glenn Morris
  2017-01-11 16:08 ` Andreas Röhler
  1 sibling, 1 reply; 4+ messages in thread
From: Clément Pit--Claudel @ 2017-01-05  1:41 UTC (permalink / raw)
  To: 25363


[-- Attachment #1.1: Type: text/plain, Size: 6836 bytes --]

Thanks for this report! Can you check whether the bug happens in Emacs 25, too?

On 01/04/2017 08:20 PM, Georges Dupret wrote:
> The ipython interpretor called within emacs does not handle identation
> properly. The following happens when hitting return:
> 
> In [5]: for x in range(3):
>   File "<ipython-input-5-782f5b7cd5c6>", line 1
>     for x in range(3):
>                       ^
> SyntaxError: unexpected EOF while parsing
> 
> Note that I have to set this in .emacs otherwise I get bad characters:
> (setq python-shell-interpreter-args " --simple-prompt --pprint")
> 
> Best,
> ged
> 
> 
> 
> In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
>  of 2016-04-17 on lgw01-04, modified by Debian
> Windowing system distributor `The X.Org Foundation', version 11.0.11804000
> System Description:    Ubuntu 16.04.1 LTS
> 
> Configured using:
>  `configure --build x86_64-linux-gnu --prefix=/usr
>  --sharedstatedir=/var/lib --libexecdir=/usr/lib
>  --localstatedir=/var/lib --infodir=/usr/share/info
>  --mandir=/usr/share/man --with-pop=yes
>  --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
>  --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
>  --libexecdir=/usr/lib --localstatedir=/var/lib
>  --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
>  --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
>  --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
>  'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
>  -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
>  -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''
> 
> Important settings:
>   value of $LANG: en_US.UTF-8
>   value of $XMODIFIERS: @im=ibus
>   locale-coding-system: utf-8-unix
> 
> Major mode: Inferior Python
> 
> Minor modes in effect:
>   shell-dirtrack-mode: t
>   pyvenv-mode: t
>   yas-global-mode: t
>   yas-minor-mode: t
>   show-paren-mode: t
>   global-linum-mode: t
>   linum-mode: t
>   TeX-PDF-mode: t
>   compilation-shell-minor-mode: t
>   tooltip-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
> 
> Recent messages:
> Beginning of buffer [4 times]
> Loading /home/ged/.emacs...
> [yas] Prepared just-in-time loading of snippets successfully.
> Loading /home/ged/.emacs...done
> Missing module docstring [missing-docstring]
> Can't guess python-indent-offset, using defaults: 4
> Sent: #!/usr/bin/env python...
> Removed if __main__ == '__main__' construct, use a prefix argument to evaluate.
> Missing module docstring [missing-docstring]
> Making completion list...
> 
> Load-path shadows:
> /usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
> /usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
> /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.5/lisp/textmodes/rst
> /usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/24.5/lisp/language/thai-word
> 
> Features:
> (shadow sort mail-extr emacsbug sendmail pylint company-oddmuse
> company-keywords company-etags company-gtags company-dabbrev-code
> company-dabbrev company-files company-cmake company-xcode company-clang
> company-eclim company-template company-css company-nxml company-bbdb
> make-mode ffap thingatpt tramp-sh tramp-cache tramp tramp-compat
> tramp-loaddefs trampver shell ibuf-ext ibuffer conf-mode vc-git
> vc-dispatcher vc-svn org-element org-rmail org-mhe org-irc org-info
> org-gnus org-docview doc-view jka-compr image-mode dired org-bibtex
> bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete
> pcomplete org-list org-faces org-entities noutline outline org-version
> ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
> ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu
> calendar cal-loaddefs ein py-autopep8 flycheck rx subr-x seq seq-24 dash
> highlight-indentation flymake eldoc company pcase elpy pyvenv
> elpy-refactor python json grep files-x etags cus-edit cus-start cus-load
> wid-edit yasnippet help-mode paren saveplace ido linum leuven-theme ert
> find-func ewoc debug timezone texinfo toolbar-x prv-emacs reporter
> desktop frameset context plain-tex tex-buf latex derived edmacro kmacro
> tex-ispell tex-style tex easy-mmode dbus xml crm advice cl-macs warnings
> cl gv compile comint ansi-color ring info tex-site autoload lisp-mnt
> tar-mode misearch multi-isearch mule-util mm-archive message format-spec
> rfc822 mml easymenu mml-sec mailabbrev gmm-utils mailheader mm-decode
> mm-bodies mm-encode mail-utils network-stream starttls url-http tls
> mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth
> url url-proxy url-privacy url-expand url-methods url-history url-cookie
> url-domsuf url-util mailcap url-handlers url-parse auth-source eieio
> byte-opt bytecomp byte-compile cl-extra cl-loaddefs cl-lib cconv
> eieio-core gnus-util mm-util help-fns mail-prsvr password-cache url-vars
> epg finder-inf package epg-config server 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
> dbusbind gfilenotify dynamic-setting system-font-setting
> font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
> 
> Memory information:
> ((conses 16 446245 90722)
>  (symbols 48 48335 1131)
>  (miscs 40 1350 577)
>  (strings 32 120840 31866)
>  (string-bytes 1 3373699)
>  (vectors 16 42217)
>  (vector-slots 8 883306 34522)
>  (floats 8 1134 273)
>  (intervals 56 2275 1303)
>  (buffers 960 26)
>  (heap 1024 74635 5094))
> 
> 
> 
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* bug#25363: 24.5; ipython integration
  2017-01-05  1:41 ` Clément Pit--Claudel
@ 2017-01-06 20:47   ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2017-01-06 20:47 UTC (permalink / raw)
  To: Clément Pit--Claudel; +Cc: 25363, georges.dupret

Clément Pit--Claudel wrote:

> Thanks for this report! Can you check whether the bug happens in Emacs
> 25, too?

(You only replied to the list, so the OP may never see your comments.
People don't need to be subscribed to report bugs.)

Anyway, apparently the answer is yes:
https://github.com/ipython/ipython/issues/9816

>> SyntaxError: unexpected EOF while parsing
>> 
>> Note that I have to set this in .emacs otherwise I get bad characters:
>> (setq python-shell-interpreter-args " --simple-prompt --pprint")

https://github.com/ipython/ipython/issues/9816

"The simple-prompt option doesn't support multi-line input"

Ie, adding --simple-prompt causes the error.





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

* bug#25363: 24.5; ipython integration
  2017-01-05  1:20 bug#25363: 24.5; ipython integration Georges Dupret
  2017-01-05  1:41 ` Clément Pit--Claudel
@ 2017-01-11 16:08 ` Andreas Röhler
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Röhler @ 2017-01-11 16:08 UTC (permalink / raw)
  To: 25363; +Cc: Clément Pit--Claudel, georges.dupret



On 05.01.2017 02:20, Georges Dupret wrote:
> The ipython interpretor called within emacs does not handle identation
> properly. The following happens when hitting return:
>
> In [5]: for x in range(3):
>   File "<ipython-input-5-782f5b7cd5c6>", line 1
>     for x in range(3):
>                       ^
> SyntaxError: unexpected EOF while parsing
>
> Note that I have to set this in .emacs otherwise I get bad characters:
> (setq python-shell-interpreter-args " --simple-prompt --pprint")
>
> Best,
> ged
>

Maybe RET is bound to   comint-send-input?

Then C-j should do th trick: electric-newline-and-maybe-indent





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

end of thread, other threads:[~2017-01-11 16:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05  1:20 bug#25363: 24.5; ipython integration Georges Dupret
2017-01-05  1:41 ` Clément Pit--Claudel
2017-01-06 20:47   ` Glenn Morris
2017-01-11 16:08 ` Andreas Röhler

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.