From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#18084: 24.3.92; python.el: buggy ipython support Date: Tue, 22 Jul 2014 17:54:12 -0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1406062981 3976 80.91.229.3 (22 Jul 2014 21:03:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2014 21:03:01 +0000 (UTC) To: 18084@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 22 23:02:55 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X9hD4-00008L-5I for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Jul 2014 23:02:54 +0200 Original-Received: from localhost ([::1]:41280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9hD3-0002Z2-Pm for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Jul 2014 17:02:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9hCJ-0001iK-Mf for bug-gnu-emacs@gnu.org; Tue, 22 Jul 2014 17:02:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9hCI-00029t-8S for bug-gnu-emacs@gnu.org; Tue, 22 Jul 2014 17:02:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9h7O-0000kW-My for bug-gnu-emacs@gnu.org; Tue, 22 Jul 2014 16:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X9h7O-0007Kl-9Z for bug-gnu-emacs@gnu.org; Tue, 22 Jul 2014 16:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Jul 2014 20:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140606258828096 (code B ref -1); Tue, 22 Jul 2014 20:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Jul 2014 20:56:28 +0000 Original-Received: from localhost ([127.0.0.1]:34955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X9h6n-0007J4-SD for submit@debbugs.gnu.org; Tue, 22 Jul 2014 16:56:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44132) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X9h59-0007F7-Be for submit@debbugs.gnu.org; Tue, 22 Jul 2014 16:54:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9h53-00088H-0p for submit@debbugs.gnu.org; Tue, 22 Jul 2014 16:54:37 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9h52-000889-Uq for submit@debbugs.gnu.org; Tue, 22 Jul 2014 16:54:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9h51-0006NV-Vv for bug-gnu-emacs@gnu.org; Tue, 22 Jul 2014 16:54:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9h51-00087m-27 for bug-gnu-emacs@gnu.org; Tue, 22 Jul 2014 16:54:35 -0400 Original-Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:57663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9h50-00087K-Qd for bug-gnu-emacs@gnu.org; Tue, 22 Jul 2014 16:54:34 -0400 Original-Received: by mail-lb0-f176.google.com with SMTP id u10so186011lbd.35 for ; Tue, 22 Jul 2014 13:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=V7XO5suy+6JM15prFpfbZGJD94qjcCOoMsW9pZ0gwqI=; b=ZF+ieq0qJf6K0Zje+JGO447QMpxSXiyJpggBaAwL6W48c2hEJ3I9kzRWRdOLx1Uw3/ bjwXhGSdU54argIqUsL0t07Lw3Zl7YWF7Pa5Sfy78OPdsGha/JJV2BN16uUwmZM4NdZD /y5lB2qhFG6HQTRF27rDJuvr7h39CXvWM8qFWp+khMDlEu6jOhJJU6t+67Lb1xvzDkqJ /mvLLLezBeE4raCPd8ZLyZDKLzGLN+gPuJ/LW7eoTfQrSx5TzK2azsJD7DfZH7rE87jL mOtRqIntkT4Ki+9BuWNucAswnLGajVUL/FSoWOYzLRQKo34riPEmxzJsAzOUlppDw6ZB jo+w== X-Received: by 10.112.93.171 with SMTP id cv11mr14202001lbb.100.1406062472669; Tue, 22 Jul 2014 13:54:32 -0700 (PDT) Original-Received: by 10.112.137.38 with HTTP; Tue, 22 Jul 2014 13:54:12 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Tue, 22 Jul 2014 16:56:23 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91749 Archived-At: 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'