From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neal Becker Newsgroups: gmane.emacs.help Subject: Re: Perfect python environment Date: Fri, 11 Sep 2009 07:50:54 -0400 Message-ID: References: <1252438710.3454.0.camel@coepsfest> <87eiqgbrgd.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1252673301 5438 80.91.229.12 (11 Sep 2009 12:48:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Sep 2009 12:48:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 11 14:48:14 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mm5Xy-00075x-7c for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Sep 2009 14:48:14 +0200 Original-Received: from localhost ([127.0.0.1]:36345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm5Xx-0002kD-Dp for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Sep 2009 08:48:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm4ie-0000Qw-OE for help-gnu-emacs@gnu.org; Fri, 11 Sep 2009 07:55:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm4iZ-0000NH-6h for help-gnu-emacs@gnu.org; Fri, 11 Sep 2009 07:55:11 -0400 Original-Received: from [199.232.76.173] (port=56323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm4iY-0000Mx-VJ for help-gnu-emacs@gnu.org; Fri, 11 Sep 2009 07:55:07 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:59100) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mm4iX-0005CR-Ij for help-gnu-emacs@gnu.org; Fri, 11 Sep 2009 07:55:06 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1Mm4iV-0007oN-0p for help-gnu-emacs@gnu.org; Fri, 11 Sep 2009 13:55:03 +0200 Original-Received: from 139.85.239.116 ([139.85.239.116]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Sep 2009 13:55:03 +0200 Original-Received: from ndbecker2 by 139.85.239.116 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Sep 2009 13:55:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Followup-To: gmane.emacs.help Original-Lines: 95 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 139.85.239.116 User-Agent: KNode/4.3.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68047 Archived-At: 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-") 'anything-ipython-complete))) (add-hook 'ipython-shell-hook #'(lambda () (define-key py-mode-map (kbd "C-") 'anything-ipython-complete))) (require 'anything-show-completion) But completions don't work in python buffer. Hitting C-, I am prompted with "pattern:", then I get: Debugger entered--Lisp error: (cl-assertion-failed header-pos) signal(cl-assertion-failed (header-pos)) (or header-pos (signal (quote cl-assertion-failed) (list ...))) (progn (or header-pos (signal ... ...)) nil) (assert header-pos) (save-excursion (assert header-pos) (goto-char header-pos) (buffer- substring-no-properties (line-beginning-position) (line-end-position))) (let* ((header-pos ...) (source-name ...)) (some (lambda ... ...) (anything-get-sources))) (save-current-buffer (set-buffer (anything-buffer-get)) (goto-char (overlay-start anything-selection-overlay)) (let* (... ...) (some ... ...))) (with-current-buffer (anything-buffer-get) (goto-char (overlay-start anything-selection-overlay)) (let* (... ...) (some ... ...))) (if (and (boundp ...) (stringp anything-source-name)) source (with- current-buffer (anything-buffer-get) (goto-char ...) (let* ... ...))) anything-get-current-source() (or anything-saved-current-source (anything-get-current-source)) (let ((source ...)) (if (and ... ...) (setq selection "")) (setq display- to-real (or display-to-real ... ...)) (if (and ... ...) (setq action ...)) (unless clear-saved-action (setq anything-saved-action nil)) (if (and selection action) (anything-funcall-with-source source action ...))) anything-execute-selection-action() (unwind-protect (anything-execute-selection-action) (anything-aif (get- buffer anything-action-buffer) (kill-buffer it)) (run-hooks (quote anything- after-action-hook))) (if anything-quit nil (unwind-protect (anything-execute-selection-action) (anything-aif ... ...) (run-hooks ...))) (unless anything-quit (unwind-protect (anything-execute-selection-action) (anything-aif ... ...) (run-hooks ...))) (let ((frameconfig ...) anything-source-name anything-in-persistent-action anything-quit anything-follow-mode (case-fold-search t) (anything-buffer ...) (anything-sources ...)) (add-hook (quote post-command-hook) (quote anything-check-minibuffer-input)) (add-hook (quote minibuffer-setup-hook) (quote anything-print-error-messages)) (setq anything-current-position (cons ... ...)) (if any-resume (anything-initialize-overlays ...) (anything- initialize)) (setq anything-last-buffer anything-buffer) (when any-input (setq anything-input any-input anything-pattern any-input)) (anything- display-buffer anything-buffer) (unwind-protect (progn ... ... ... ...) (anything-cleanup) (remove-hook ... ...) (remove-hook ... ...) (anything- set-frame/window-configuration frameconfig)) (unless anything-quit (unwind- protect ... ... ...))) (progn (let (... anything-source-name anything-in-persistent-action anything-quit anything-follow-mode ... ... ...) (add-hook ... ...) (add-hook ... ...) (setq anything-current-position ...) (if any-resume ... ...) (setq anything-last-buffer anything-buffer) (when any-input ...) (anything- display-buffer anything-buffer) (unwind-protect ... ... ... ... ...) (unless anything-quit ...))) (unwind-protect (progn (let ... ... ... ... ... ... ... ... ... ...)) (loop for (var . value) in --orig-vars do (set var value))) (let ((--orig-vars ...)) (unwind-protect (progn ...) (loop for ... in -- orig-vars do ...))) (with-anything-restore-variables (let (... anything-source-name anything- in-persistent-action anything-quit anything-follow-mode ... ... ...) (add- hook ... ...) (add-hook ... ...) (setq anything-current-position ...) (if any-resume ... ...) (setq anything-last-buffer anything-buffer) (when any- input ...) (anything-display-buffer anything-buffer) (unwind-protect ... ... ... ... ...) (unless anything-quit ...))) (condition-case v (with-anything-restore-variables (let ... ... ... ... ... ... ... ... ... ...)) (quit (setq minibuffer-history ...) (goto-char ...) (set-window-start ... ...) nil)) anything(anything-source-ipython "os.f") (let ((initial-pattern ...)) (anything (quote anything-source-ipython) initial-pattern)) anything-ipython-complete() call-interactively(anything-ipython-complete nil nil)