* How to enable autocomplete for Python class, module site-packages
@ 2008-12-11 5:55 Tính Trương Xuân
0 siblings, 0 replies; 2+ messages in thread
From: Tính Trương Xuân @ 2008-12-11 5:55 UTC (permalink / raw
To: ecb-list, help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 4150 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 5240 bytes --]
[-- Attachment #2: Type: text/plain, Size: 366 bytes --]
------------------------------------------------------------------------------
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/
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ecb-list mailing list
Ecb-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecb-list
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to enable autocomplete for Python class, module site-packages
[not found] <mailman.2499.1228978895.26697.help-gnu-emacs@gnu.org>
@ 2008-12-12 19:50 ` Xah Lee
0 siblings, 0 replies; 2+ messages in thread
From: Xah Lee @ 2008-12-12 19:50 UTC (permalink / raw
To: help-gnu-emacs
On Dec 10, 9:55 pm, "Tính Trương Xuân" <tinh.tru...@evolus.vn> wrote:
> 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 (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
> (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?
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
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-12 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.2499.1228978895.26697.help-gnu-emacs@gnu.org>
2008-12-12 19:50 ` How to enable autocomplete for Python class, module site-packages Xah Lee
2008-12-11 5:55 Tính Trương Xuân
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.