Andreas Röhler Wed, 31 Aug 2011 19:40:33 -0000
> Does pycomplete work for you?
Apparently not. Here's how I tested:
0 Open setup.py (distributed with python-mode) in buffer.
1 In the first line
- from distutils.core import setup
backspace to
+ from distutils.core imp
2 Test keys: if I press
* Tab -> nothing. Press Tab again: line indents. `C-x u` to restore.
* C-Tab -> buffer splits (lower buffer name="*anything*") and in minibuffer I get prompt=
> pattern:
with text=
> imp
`C-g` to restore.
* C-M-i -> I get the minibuffer message
> No completions available; use M-T or M-x semantic-mode
I suspect the above behavior is due to:
0 I am
> Using `python-mode' version 6.0.2
1 I don't have pymacs, and pycomplete requires pymacs (no?)
2 I do have `anything`, but I can delete that.
The python-related stuff called from my init.el follows to end of post.
Your suggestions for its improvements (at least for testing purposes)
are appreciated.------------------------------------------------------
Andreas Röhler Wed, 31 Aug 2011 19:40:33 -0000
> Does pycomplete work for you?
Apparently not. Here's how I tested:
0 Open setup.py (distributed with python-mode) in buffer.
1 In the first line
- from distutils.core import setup
backspace to
+ from distutils.core imp
2 Test keys: if I press
* Tab -> nothing. Press Tab again: line indents. `C-x u` to restore.
* C-Tab -> buffer splits (lower buffer name="*anything*") and in minibuffer I get prompt=
> pattern:
with text=
> imp
`C-g` to restore.
* C-M-i -> I get the minibuffer message
> No completions available; use M-T or M-x semantic-mode
I suspect the above behavior is due to:
0 I am
> Using `python-mode' version 6.0.2
1 I don't have pymacs, and pycomplete requires pymacs (no?)
2 I do have `anything`, but I can delete that.
The python-related stuff called from my init.el follows to end of post. ------- ------- ------- ------- ------- ------- ------- -----
Your suggestions for its improvements (at least for testing purposes)
are appreciated.
(defconst LOCAL-PYTHON- LISP-DIR (concat LOCAL-EMACS- LISP-DIR "/python")) PYTHON- LISP-DIR LISP-DIR "/python-mode") LISP-DIR "/anything") LISP-DIR "/pylookup")
(setq load-path
(append
(list
LOCAL-
(concat LOCAL-PYTHON-
(concat LOCAL-PYTHON-
(concat LOCAL-PYTHON-
)
load-path)
) ; end (setq load-path
(require 'python-mode)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(require 'ipython)
(require 'anything) show-completion nil t) anything- show-completion 'anything- ipython- complete
'( length initial-pattern)))
(define- key py-mode-map (kbd "C-<tab>") 'anything- ipython- complete) ))
(define- key py-mode-map (kbd "C-<tab>") 'anything- ipython- complete) ))
(require 'anything-ipython)
(when (require 'anything-
(use-
;;; begin adaptation from header comments to anything-ipython.el
;;; use C-Tab, not M-Tab (which changes windows)
(add-hook 'python-mode-hook #'(lambda ()
(add-hook 'ipython-shell-hook #'(lambda ()
;;; end adaptation from header comments to anything-ipython.el
(require 'comint) previous- input) next-matching- input-from- input) previous- matching- input-from- input)
(define-key comint-mode-map (kbd "M-") 'comint-next-input)
(define-key comint-mode-map (kbd "M-") 'comint-
(define-key comint-mode-map [down] 'comint-
(define-key comint-mode-map [up] 'comint-
;;; pylookup d/site- lisp/python/ pylookup/ pylookup. py") d/site- lisp/python/ pylookup/ pylookup. db")
(autoload 'pylookup-lookup "pylookup")
(autoload 'pylookup-update "pylookup")
;;; TODO: reuse load-path above
(setq pylookup-program "~/.emacs.
(setq pylookup-db-file "~/.emacs.
(global-set-key "\C-ch" 'pylookup-lookup)
;;; autopair global- mode "autopair" nil t) global- mode) dont-activate t)))
( getf autopair- extra-pairs :code)) handle- action- fns
( list #'autopair- default- handle- action
#' autopair- python- triple- quote-action) )))
(autoload 'autopair-
(autopair-
(add-hook 'lisp-mode-hook
#'(lambda () (setq autopair-
(add-hook 'python-mode-hook
#'(lambda ()
(push '(?' . ?')
(setq autopair-
(require 'python-pep8) trailing- whitespace)
(require 'python-pylint)
(add-hook 'before-save-hook 'delete-
;;; yasnippet d/site- lisp/python/ my-snippets/ ")
(require 'yasnippet-bundle)
(yas/initialize)
(yas/load-directory "~/.emacs.
;;; nose support (for testing): see lisp/python/ nose.el /bitbucket. org/jpellerin/ nosemacs/ src/0192bf439dc 9/nose. el
(local- set-key "\C-ca" 'nosetests-all)
(local- set-key "\C-cm" 'nosetests-module)
(local- set-key "\C-c." 'nosetests-one)
(local- set-key "\C-cpa" 'nosetests-pdb-all)
(local- set-key "\C-cpm" 'nosetests- pdb-module)
(local- set-key "\C-cp." 'nosetests- pdb-one) ))
;;; .../site-
;;; from
;;; https:/
(require 'nose)
;;; default keybindings from nose.el
(add-hook 'python-mode-hook
(lambda ()