unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* code completion in python-mode, using ipython and anything
@ 2011-10-24 23:27 Michael Powe
  0 siblings, 0 replies; only message in thread
From: Michael Powe @ 2011-10-24 23:27 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I cannot get the code completion feature to work for me.  I get an
*anything* buffer but it is empty.

I have done quite a bit of fiddling and researching but have not been
able to get around this basic issue.  Attempting a completion brings up
the buffer that should contain the completion options, but it is empty.

Here is the enabling code from .emacs.

8<------------------------------------------------------------------->8
(if (equal nil (locate-file "python-mode.el" load-path))
	(message "python-mode not found in path")
  (progn
	(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)))

(if (equal nil (locate-file "ipython.el" load-path))
	(message "ipython.el file not found")
  (progn
	(require 'ipython)
	(setq py-python-command-args '("-i" "--colors=LightBG"))
	))

(if (equal nil (locate-file "anything.el" load-path))
	(message "anything.el files not found")
  (progn 
	(require 'anything)
	(require 'anything-ipython)
	(add-hook 'python-mode-hook #'(lambda ()
									(define-key py-mode-map (kbd "C-<tab>") 'anything-ipython-complete)))
	(add-hook 'ipython-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)))
	(when (require 'anything-show-completion nil t)
	  (use-anything-show-completion 'anything-ipython-complete
									'(length initial-pattern)))
	))
8<------------------------------------------------------------------->8

AFAICS, the variables that need to be turned on to enable the
auto-completion to work, are all properly set.  I have read the
instructions in the individual .el files and double-checked that my code
reproduces them.  

Any suggestions as to why this might be happening would be appreciated.

Thanks.

mp

-- 
cat: /home/powem/.signature: No such file or directory


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-24 23:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 23:27 code completion in python-mode, using ipython and anything Michael Powe

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).