From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "=?UTF-8?Q?T=C3=ADnh_Tr=C6=B0=C6=A1ng_Xu=C3=A2n?=" Newsgroups: gmane.emacs.code-browser,gmane.emacs.help Subject: How to enable autocomplete for Python class, module site-packages Date: Thu, 11 Dec 2008 12:55:03 +0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7958620221473477340==" X-Trace: ger.gmane.org 1228977873 19502 80.91.229.12 (11 Dec 2008 06:44:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 06:44:33 +0000 (UTC) To: ecb-list@lists.sourceforge.net, help-gnu-emacs@gnu.org Original-X-From: ecb-list-bounces@lists.sourceforge.net Thu Dec 11 07:45:37 2008 Return-path: Envelope-to: emacs-ecb@m.gmane.org Original-Received: from lists.sourceforge.net ([216.34.181.88]) by lo.gmane.org with esmtp (Exim 4.50) id 1LAfIk-00072N-95 for emacs-ecb@m.gmane.org; Thu, 11 Dec 2008 07:45:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by h25xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1LAfHH-0003rK-78; Thu, 11 Dec 2008 06:44:03 +0000 Original-Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by h25xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1LAfHG-0003rD-99 for ecb-list@lists.sourceforge.net; Thu, 11 Dec 2008 06:44:02 +0000 X-ACL-Warn: Original-Received: from wf-out-1314.google.com ([209.85.200.175]) by 72vjzd1.ch3.sourceforge.com with esmtp (Exim 4.69) id 1LAfH6-0006mX-Ey for ecb-list@lists.sourceforge.net; Thu, 11 Dec 2008 06:44:02 +0000 Original-Received: by wf-out-1314.google.com with SMTP id 27so595863wfd.4 for ; Wed, 10 Dec 2008 22:43:50 -0800 (PST) Original-Received: by 10.142.135.13 with SMTP id i13mr588581wfd.217.1228974903398; Wed, 10 Dec 2008 21:55:03 -0800 (PST) Original-Received: by 10.142.245.5 with HTTP; Wed, 10 Dec 2008 21:55:03 -0800 (PST) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "g2vjzd1.ch3.sourceforge.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, I happen to develop Python related project and I select Emacs as my editor. I have installed Emacs 23 on my Fedora 10 machine with the following extension: - CEDET 1.0pre4 - ECB 2.32 - Pymacs-0.24_beta1 - rope-0.9.1 - ropemacs-0.6 - Python mode (from https://launchpad.net/python-mode/) But I don't know how to setup Emacs to have "intellisense" for libraries in site-packages of python. Here is my .emacs file: ;; .emacs [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1LAfH6-0006mX-Ey X-BeenThere: ecb-list@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: "Mailing list for ECB help, dicussion and announces." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ecb-list-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.code-browser:2203 gmane.emacs.help:60547 Archived-At: --===============7958620221473477340== Content-Type: multipart/alternative; boundary="----=_Part_8836_3289053.1228974903370" ------=_Part_8836_3289053.1228974903370 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I happen to develop Python related project and I select Emacs as my editor. I have installed Emacs 23 on my Fedora 10 machine with the following extension: - CEDET 1.0pre4 - ECB 2.32 - Pymacs-0.24_beta1 - rope-0.9.1 - ropemacs-0.6 - Python mode (from https://launchpad.net/python-mode/) But I don't know how to setup Emacs to have "intellisense" for libraries in site-packages of python. Here is my .emacs file: ;; .emacs ;;; uncomment this line to disable loading of "default.el" at startup ;; (setq inhibit-default-init t) ;; enable visual feedback on selections (setq transient-mark-mode t) ;; default to better frame titles (setq frame-title-format (concat "%b - emacs@" (system-name))) ;; default to unified diffs (setq diff-switches "-u") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Beginning of my customization ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Add our site-lisp to the load-path (setq load-path (cons "~/.emacs.d" load-path)) (progn (cd "~/.emacs.d") (normal-top-level-add-subdirs-to-load-path)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Common stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;Removed for readability ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; CEDET stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-library "cedet-stuff") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ECB stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-library "ecb-stuff") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Python stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-library "python-stuff") Here is the cedet-stuff.el: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; CEDET ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-file "~/.emacs.d/cedet-1.0pre4/common/cedet.el") ;;make all the 'semantic.cache' files go somewhere sane (setq semanticdb-default-save-directory "~/emacs-meta/semantic.cache/") ;; Enabling various SEMANTIC minor modes. See semantic/INSTALL for more ideas. ;; Select one of the following ;(semantic-load-enable-code-helpers) ;; (semantic-load-enable-guady-code-helpers) ;; (semantic-load-enable-excessive-code-helpers) ;; Enable this if you develop in semantic, or develop grammars ;; (semantic-load-enable-semantic-debugging-helpers) Here is the ecb-stuff.el: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ECB ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; load ECB (require 'ecb) (require 'ecb-autoloads) ;; Disable update version check (setq ecb-version-check nil) ;; Filter unwanted source file (setq ecb-source-file-regexps (quote ((".*" ("\\(^\\(\\.\\|#\\)\\|\\(~$\\|\\.\\(pyc\\|elc\\|obj\\|o\\|class\\|lib\\|dll\\|a\\|so\\|cache\\)$\\)\\)") ("^\\.\\(emacs\\|gnus\\)$"))))) ;;Turn off Tip of the day (setq ecb-tip-of-the-day nil) ;; Set the layout (setq ecb-layout-name "left14") ;; Show the source file under the directories (setq ecb-show-sources-in-directories-buffer '("left7" "left13" "left14" "left15")) ;; Set the left-click mouse button to collapse directory in directory buffer (setq ecb-primary-secondary-mouse-buttons (quote mouse-1--C-mouse-1)) ;; Turn on semantic (setq semantic-load-turn-everything-on t) (require 'semantic-load) Here is the python-stuff.el: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Python mode customization ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Python mode (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist)) (setq interpreter-mode-alist (cons '("python" . python-mode) interpreter-mode-alist)) (autoload 'python-mode "python-mode" "Python editing mode." t) ;; setup pymacs (autoload 'pymacs-apply "pymacs") (autoload 'pymacs-call "pymacs") (autoload 'pymacs-eval "pymacs" nil t) (autoload 'pymacs-exec "pymacs" nil t) (autoload 'pymacs-load "pymacs" nil t) ;;(eval-after-load "pymacs" ;; '(add-to-list 'pymacs-load-path YOUR-PYMACS-DIRECTORY")) (pymacs-load "ropemacs" "rope-") (setq ropemacs-enable-autoimport t) Emacs run just fine with all the above extensions. What should I do to make "intellisense" for modules, classes, methods in site-packages of Python? Many thanks. Tinh ------=_Part_8836_3289053.1228974903370 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline    Hello,
I happen to develop Python related project and I select Emacs as my editor. I have installed Emacs 23 on my Fedora 10 machine with the following extension:
- CEDET 1.0pre4
- ECB 2.32
- Pymacs-0.24_beta1
- rope-0.9.1
- ropemacs-0.6
- Python mode (from https://launchpad.net/python-mode/)
But I don't know how to setup Emacs to have "intellisense" for libraries in site-packages of python. Here is my .emacs file:
;; .emacs

;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)

;; enable visual feedback on selections
(setq transient-mark-mode t)

;; default to better frame titles
(setq frame-title-format
      (concat  "%b - emacs@" (system-name)))

;; default to unified diffs
(setq diff-switches "-u")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Beginning of my customization
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Add our site-lisp to the load-path
(setq load-path (cons "~/.emacs.d" load-path))
(progn (cd "~/.emacs.d") (normal-top-level-add-subdirs-to-load-path))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Common stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;Removed for readability

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; CEDET stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load-library "cedet-stuff")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ECB stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load-library "ecb-stuff")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Python stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load-library "python-stuff")

Here is the cedet-stuff.el:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; CEDET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load-file "~/.emacs.d/cedet-1.0pre4/common/cedet.el")
;;make all the 'semantic.cache' files go somewhere sane
(setq semanticdb-default-save-directory "~/emacs-meta/semantic.cache/")
;; Enabling various SEMANTIC minor modes.  See semantic/INSTALL for more ideas.
;; Select one of the following
;(semantic-load-enable-code-helpers)
;; (semantic-load-enable-guady-code-helpers)
;; (semantic-load-enable-excessive-code-helpers)
;; Enable this if you develop in semantic, or develop grammars
;; (semantic-load-enable-semantic-debugging-helpers)


Here is the ecb-stuff.el:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ECB
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; load ECB
(require 'ecb)
(require 'ecb-autoloads)

;; Disable update version check
(setq ecb-version-check nil)

;; Filter unwanted source file
(setq ecb-source-file-regexps (quote ((".*" ("\\(^\\(\\.\\|#\\)\\|\\(~$\\|\\.\\(pyc\\|elc\\|obj\\|o\\|class\\|lib\\|dll\\|a\\|so\\|cache\\)$\\)\\)") ("^\\.\\(emacs\\|gnus\\)$")))))


;;Turn off Tip of the day
(setq ecb-tip-of-the-day nil)

;; Set the layout
(setq ecb-layout-name "left14")

;; Show the source file under the directories
(setq ecb-show-sources-in-directories-buffer '("left7" "left13" "left14" "left15"))

;; Set the left-click mouse button to collapse directory in directory buffer
(setq ecb-primary-secondary-mouse-buttons (quote mouse-1--C-mouse-1))

;; Turn on semantic
(setq semantic-load-turn-everything-on t)
(require 'semantic-load)

Here is the python-stuff.el:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Python mode customization
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Python mode
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode)
                                       interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)


;; setup pymacs
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
;;(eval-after-load "pymacs"
;;  '(add-to-list 'pymacs-load-path YOUR-PYMACS-DIRECTORY"))

(pymacs-load "ropemacs" "rope-")
(setq ropemacs-enable-autoimport t)

Emacs run just fine with all the above extensions. What should I do to make "intellisense" for modules, classes, methods in site-packages of Python?

Many thanks.
Tinh
------=_Part_8836_3289053.1228974903370-- --===============7958620221473477340== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ --===============7958620221473477340== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ecb-list mailing list Ecb-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecb-list --===============7958620221473477340==--