From: Neal Becker <ndbecker2@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Perfect python environment
Date: Fri, 11 Sep 2009 19:23:51 -0400 [thread overview]
Message-ID: <h8em68$sqk$1@ger.gmane.org> (raw)
In-Reply-To: 87eiqdfbfh.fsf@tux.homenetwork
Thierry Volpiatto wrote:
> Neal Becker <ndbecker2@gmail.com> writes:
>
>> Thierry Volpiatto wrote:
>>
>>> Hi, i never been able to install rope correctly also.
>>> even when installed, i found severe bugs that crash emacs (don't
>>> remember what it was).
>>>
>>> If you just want completion in python, consider using ipython as
>>> python-shell in emacs and use anything-python for completion.
>>> See:
>>>
>>> http://ipython.scipy.org/
>>> http://www.emacswiki.org/cgi-bin/emacs/PythonMode
>>> http://www.emacswiki.org/cgi-bin/emacs/anything-ipython.el
>>>
>> Thanks! I installed anything-ipython, and now in ipython shell, I have
>> completions.
>>
>> I also added:
>> (add-hook 'python-mode-hook #'(lambda ()
>> (define-key py-mode-map (kbd "C-<tab>")
>> 'anything-ipython-complete)))
>> (add-hook 'ipython-shell-hook #'(lambda ()
>> (define-key py-mode-map (kbd "C-<tab>")
>> 'anything-ipython-complete)))
>> (require 'anything-show-completion)
>
> It seem your configuration of anything-ipython is wrong, be sure to read
> carefully the instructions in anything-ipython.el.
> I can't reproduce your error.
> Here is my config:
>
> ,----[ Config thierry anything-ipython ]
> | (require 'anything-ipython)
> | (add-hook 'python-mode-hook #'(lambda ()
> | (define-key py-mode-map (kbd "M-<tab>")
> | 'anything-ipython-complete)))
> | (add-hook 'ipython-mode-hook #'(lambda ()
> | (define-key py-mode-map (kbd
> | "M-<tab>")
> | 'anything-ipython-complete)))
> |
> | (add-hook 'ipython-shell-hook #'(lambda ()
> | (define-key py-mode-map (kbd
> | "M-<tab>")
> | 'anything-ipython-complete)))
> | (when (require 'anything-show-completion nil t)
> | (use-anything-show-completion 'anything-ipython-complete
> | '(length initial-pattern)))
> | (define-key py-mode-map (kbd "C-c M")
> | 'anything-ipython-import-modules-from-buffer)
> `----
>
> To have completion in python buffer (i.e in your python file, not the
> shell) you have to start first the ipython interpreter, and then load
> all the modules you have in your python file.
> Load modules one by one in ipython interpreter or use from your file
> C-c M (see above).
> Be sure also to setup python-mode (PYTHON-MODE, not the bad one that
> come with emacs) correctly.
> Let me know if you have more problems.
>
It seems if I don't use C-c M then I get the traceback I showed. Also if
there are no completions I get that assertion (Assertion failed: header-
pos). For example:
-----
import os
os.fcn
-----
Try to complete os.fcn gives that assertion.
python-mode.el is 5.1.0. emacs is 23.1.1.
next prev parent reply other threads:[~2009-09-11 23:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-08 19:38 Perfect python environment jakob fischer
2009-09-09 5:46 ` Thierry Volpiatto
2009-09-11 11:50 ` Neal Becker
2009-09-11 20:56 ` Thierry Volpiatto
2009-09-11 23:23 ` Neal Becker [this message]
2009-09-12 6:17 ` Thierry Volpiatto
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='h8em68$sqk$1@ger.gmane.org' \
--to=ndbecker2@gmail.com \
--cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).