all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: 18084@debbugs.gnu.org
Subject: bug#18084: 24.3.92; python.el: buggy ipython support
Date: Tue, 22 Jul 2014 17:54:12 -0300	[thread overview]
Message-ID: <CAELgYhcKjSiiEygm_7F0U6MJWg1csGedTnh4_77C5wxSSr8zOw@mail.gmail.com> (raw)

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'





             reply	other threads:[~2014-07-22 20:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 20:54 Carlos Pita [this message]
2014-07-28  4:34 ` bug#18084: 24.3.92; python.el: buggy ipython support Fabián Ezequiel Gallina
     [not found] ` <handler.18084.D18084.140652207214816.notifdone@debbugs.gnu.org>
2014-07-28 14:36   ` bug#18084: closed (24.3.92; python.el: buggy ipython support) Carlos Pita
2014-07-28 21:10     ` Fabián Ezequiel Gallina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAELgYhcKjSiiEygm_7F0U6MJWg1csGedTnh4_77C5wxSSr8zOw@mail.gmail.com \
    --to=carlosjosepita@gmail.com \
    --cc=18084@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.