GNU bug report logs - #18084
24.3.92; python.el: buggy ipython support

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Tue, 22 Jul 2014 20:57:01 UTC

Severity: normal

Fixed in version 24.3.92

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#18084: closed (24.3.92; python.el: buggy ipython support)
Date: Mon, 28 Jul 2014 04:35:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 28 Jul 2014 01:34:27 -0300
with message-id <87oawaw17w.fsf <at> gnu.org>
and subject line 24.3.92; python.el: buggy ipython support
has caused the debbugs.gnu.org bug report #18084,
regarding 24.3.92; python.el: buggy ipython support
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
18084: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18084
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.92; python.el: buggy ipython support
Date: Tue, 22 Jul 2014 17:54:12 -0300
Ipython is pretty smart doing autocompletion and output coloring but
python.el is currently getting in its way:

1) The coloring is heuristic at best. It's ok for the vanilla python
interpreter but not nearly as good as ipython's. Not only keywords and
identifiers are colored in non-code contexts, but also string quoting
gets often messed up. I think the best option is to disable font lock by
default when the interpreter is ipython.

2) Autocompletion of magic commands is broken. Autocompletion of paths
is broken. Maybe another kind of ipython specific autocompletion is
broken too. Currently the autocompletion prefix is parsed from the
buffer using a "dotty" syntax table that includes '.' and '_' as part of
identifiers. Clearly this is not enough to play well with ipython. But
fortunately it's not necessary to be too smart. Sendind the prefix up to
the first preceding whitespace char will do the trick.

So I propose to:

i) Disable font lock by default for ipython.
ii) Parsing the prefix up to whitespace char for ipython autocompletion.

I think these solutions are very simple and will improve the ipython
experience a lot. Obviously the color theme will differ from the one for
python-mode but this is a minor annoyance for such gain in simplicity.

-----------

In GNU Emacs 24.3.92.1 (i686-pc-linux-gnu, GTK+ Version 3.12.2)
 of 2014-07-22 on carlos
Windowing system distributor `The X.Org Foundation', version 11.0.11502000
Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong
 --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'


[Message part 3 (message/rfc822, inline)]
From: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
To: 18084-done <at> debbugs.gnu.org
Subject: 24.3.92; python.el: buggy ipython support
Date: Mon, 28 Jul 2014 01:34:27 -0300
Fixed at revno 117595 in trunk.

Also revno 117580 includes relevant changes on shell font-locking.


Cheers,
Fabián


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

Previous Next


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