* Perfect python environment @ 2009-09-08 19:38 jakob fischer 2009-09-09 5:46 ` Thierry Volpiatto 0 siblings, 1 reply; 6+ messages in thread From: jakob fischer @ 2009-09-08 19:38 UTC (permalink / raw) To: help-gnu-emacs Hello, I am running Ubuntu 9.4. Since three days I am trying to install The perfect python environment on emacs according to the howtos http://www.enigmacurry.com/2009/01/19/my-emacs-config-on-github/ and http://hide1713.wordpress.com/2009/01/30/setup-perfect-python-environment-in-emacs/ I allways get a void on functions in rope, even if I follow the hotow step by step or just clone the github stuff from enigma curry. I istalled the suggested versions of the libs and so on. Does anybody have some knowledge about this perfect python environment for emacs? And how can i get emacs to give me some decent debub info. Note: I am pretty much an emacs newbie and do not understand lisp code. Thank you, jakob ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Perfect python environment 2009-09-08 19:38 Perfect python environment jakob fischer @ 2009-09-09 5:46 ` Thierry Volpiatto 2009-09-11 11:50 ` Neal Becker 0 siblings, 1 reply; 6+ messages in thread From: Thierry Volpiatto @ 2009-09-09 5:46 UTC (permalink / raw) To: help-gnu-emacs 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 jakob fischer <jakob.fischer@coeps.net> writes: > Hello, > I am running Ubuntu 9.4. Since three days I am trying to install The > perfect python environment on emacs according to the howtos > http://www.enigmacurry.com/2009/01/19/my-emacs-config-on-github/ and > http://hide1713.wordpress.com/2009/01/30/setup-perfect-python-environment-in-emacs/ > > I allways get a void on functions in rope, even if I follow the hotow > step by step or just clone the github stuff from enigma curry. I > istalled the suggested versions of the libs and so on. > > Does anybody have some knowledge about this perfect python environment > for emacs? And how can i get emacs to give me some decent debub info. > > Note: I am pretty much an emacs newbie and do not understand lisp code. > > Thank you, jakob > > > > -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Perfect python environment 2009-09-09 5:46 ` Thierry Volpiatto @ 2009-09-11 11:50 ` Neal Becker 2009-09-11 20:56 ` Thierry Volpiatto 0 siblings, 1 reply; 6+ messages in thread From: Neal Becker @ 2009-09-11 11:50 UTC (permalink / raw) To: help-gnu-emacs 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) But completions don't work in python buffer. Hitting C-<tab>, 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) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Perfect python environment 2009-09-11 11:50 ` Neal Becker @ 2009-09-11 20:56 ` Thierry Volpiatto 2009-09-11 23:23 ` Neal Becker 0 siblings, 1 reply; 6+ messages in thread From: Thierry Volpiatto @ 2009-09-11 20:56 UTC (permalink / raw) To: help-gnu-emacs 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. > But completions don't work in python buffer. Hitting C-<tab>, 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) > > > > > -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Perfect python environment 2009-09-11 20:56 ` Thierry Volpiatto @ 2009-09-11 23:23 ` Neal Becker 2009-09-12 6:17 ` Thierry Volpiatto 0 siblings, 1 reply; 6+ messages in thread From: Neal Becker @ 2009-09-11 23:23 UTC (permalink / raw) To: help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Perfect python environment 2009-09-11 23:23 ` Neal Becker @ 2009-09-12 6:17 ` Thierry Volpiatto 0 siblings, 0 replies; 6+ messages in thread From: Thierry Volpiatto @ 2009-09-12 6:17 UTC (permalink / raw) To: help-gnu-emacs Hi, Neal Becker <ndbecker2@gmail.com> writes: > 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). I can't reproduce, all work fine here. That error come from anything.el itself (in `anything-get-current-source'). It is not related with anything-python.el specialy. I suspect you will have the same error with others anything modules also. You have to make anything working. Can you describe how did you install anything, what anything files you load etc... Be sure also to use anything-config.el.(it will require anything) Also, don't add anything-python source to anything-sources, use it only with function `anything-ipython-complete.' >For example: > ----- > import os > os.fcn > ----- > > Try to complete os.fcn gives that assertion. BTW what is os.fcn? i have no completion on that, but yes on os.fc Anyway if you forget to launch ipython or to load modules, anything-ipython complete nothing, do nothing, it don't crash if you forget that, it just wait. > python-mode.el is 5.1.0. emacs is 23.1.1. So good you have python-mode.el. > > > > > > -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-09-12 6:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2009-09-12 6:17 ` Thierry Volpiatto
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).