From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: How to enable autocomplete for Python class, module site-packages Date: Fri, 12 Dec 2008 11:50:24 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1229152508 30443 80.91.229.12 (13 Dec 2008 07:15:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Dec 2008 07:15:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 13 08:16:14 2008 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 1LBOjU-0006Vx-Ly for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Dec 2008 08:16:13 +0100 Original-Received: from localhost ([127.0.0.1]:57604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBOiJ-0000rV-1t for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Dec 2008 02:14:59 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!q30g2000prq.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 160 Original-NNTP-Posting-Host: 76.102.50.240 Original-X-Trace: posting.google.com 1229111425 17642 127.0.0.1 (12 Dec 2008 19:50:25 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 12 Dec 2008 19:50:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q30g2000prq.googlegroups.com; posting-host=76.102.50.240; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:165241 X-Mailman-Approved-At: Sat, 13 Dec 2008 02:11:56 -0500 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:60583 Archived-At: On Dec 10, 9:55=C2=A0pm, "T=C3=ADnh Tr=C6=B0=C6=A1ng Xu=C3=A2n" wrote: > =C2=A0 =C2=A0Hello, > I happen to develop Python related project and I select Emacs as my edito= r. > 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 (fromhttps://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 > =C2=A0 =C2=A0 =C2=A0 (concat =C2=A0"%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. =C2=A0See 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\\|d= ll \\|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 buf= fer > (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) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0interpret= er-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" > ;; =C2=A0'(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 ma= ke > "intellisense" for modules, classes, methods in site-packages of Python? reduce you question to one specific point will help. most of us don't know intellisense editor, and many of us dont do Python. So, what exactly you want to do? if i recall correctly, Intellisense is a commercial text editor. Is your q about some features of Intellisense you want? Or is your q about some feature you know that works in emacs but doesn't?? sorry if you mean to ask those specific python developers who knows about this... but seeing your message has no reply, i thought i'd suggest. Xah =E2=88=91 http://xahlee.org/ =E2=98=84