<div dir="ltr">Hi<br><br><div class="gmail_quote">2008/9/12 Rohan Nicholls <span dir="ltr"><<a href="mailto:rohan.nicholls@googlemail.com">rohan.nicholls@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Stefan,<br>
<br>
Can you post your settings? And are you using python-mode<br>
or the python.el that comes with emacs?</blockquote><div><br>python-mode<br><br>Sure, my settings are these:<br><br>;; Python-Mode<br>(require 'ipython)<br>;; up and down the history:<br>(require 'comint)<br> (define-key comint-mode-map [(meta up)]<br>
'comint-previous-matching-input-from-input)<br> (define-key comint-mode-map [(meta down)]<br> 'comint-next-matching-input-from-input)<br> (define-key comint-mode-map [(control meta up)]<br>
'comint-next-input)<br> (define-key comint-mode-map [(control meta down)]<br> 'comint-previous-input)<br><br>;; setup python mode<br>(setq auto-mode-alist ; trigger python mode automatically<br>
(cons '("\\.py$" . python-mode) auto-mode-alist))<br>(autoload 'python-mode "python-mode" "Python editing mode." t)<br>; add my customization<br>(add-hook 'python-mode-hook 'my-python-hook)<br>
; this gets called by outline to deteremine the level. Just use the length of the whitespace<br>(defun py-outline-level ()<br> (let (buffer-invisibility-spec)<br> (save-excursion<br> (skip-chars-forward "\t ")<br>
(current-column))))<br>; this gets called after python mode is enabled<br>(defun my-python-hook ()<br> ; outline uses this regexp to find headers. I match lines with no indent and indented "class"<br> ; and "def" lines.<br>
(setq outline-regexp "[^ \t]\\|[ \t]*\\(def\\|class\\) ")<br> ; enable our level computation<br> (setq outline-level 'py-outline-level)<br> ; do not use their \C-c@ prefix, too hard to type. Note this overides some python mode bindings<br>
(setq outline-minor-mode-prefix "\C-c")<br> ; turn on outline mode<br> (outline-minor-mode t)<br> ; initially hide all but the headers<br> (hide-body)<br> ; I use CUA mode on the PC so I rebind these to make the more accessible<br>
(local-set-key [?\C-\t] 'py-shift-region-right)<br> (local-set-key [?\C-\S-\t] 'py-shift-region-left)<br> ; make paren matches visible<br> (show-paren-mode 1)<br>)<br><br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Okay, so you have an even older version than I do, so I will<br>
have to assume you are using the old python-mode package.<br>
<br>
Btw. just so everyone knows the python.el package has some<br>
nice features, including completion, but not with context.<br>
<br>
So you could get completions for wx.richtext....<br>
And unfortunately the completion does not work when in the<br>
interpreter, which is really where you need it.<br>
<br>
I am also using emacs-snapshot (23.x).<br>
<br>
Thanks for the info. I will have to look into this more.<br>
<font color="#888888"></font></blockquote><div><br>:-)<br><br>Cheers,<br>Stefan<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
Rohan<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Fri, Sep 12, 2008 at 9:08 AM, Stefan Schwarzburg<br>
<<a href="mailto:stefan.schwarzburg@googlemail.com">stefan.schwarzburg@googlemail.com</a>> wrote:<br>
> Hi Thomas, Hi Rohan,<br>
> I'm using ipython.el.<br>
> I can't remember where I got it from, but it has "$Revision: 2275 $" in it,<br>
> if that helps.<br>
> I'm using emacs-snapshot-gtk "GNU Emacs <a href="http://23.0.60.1" target="_blank">23.0.60.1</a> (i486-pc-linux-gnu, GTK+<br>
> Version 2.12.9) of 2008-05-06 on iridium, modified by Debian"<br>
><br>
> ipython mode works well, although TAB completion is emacs like (new buffer<br>
> with the possible completions).<br>
> And "obj<TAB>" completes to object (without asking, because its the only<br>
> possibility...)<br>
><br>
> Cheers,<br>
> Stefan<br>
><br>
><br>
> 2008/9/12 Thomas Bach <<a href="mailto:bachth@uni-mainz.de">bachth@uni-mainz.de</a>><br>
>><br>
>> Rohan Nicholls wrote:<br>
>> > Hi all,<br>
>> Hi,<br>
>><br>
>> > I have just installed ipython from bzr, and have added ipython.el to my<br>
>> > emacs<br>
>> > setup. It is giving me errors, so I thought I would ask if anyone is<br>
>> > using<br>
>> > this library?<br>
>><br>
>> I tried so several days ago, it resulted in the following post to this<br>
>> list:<br>
>> ---[SNIP]---<br>
>> Hi,<br>
>><br>
>> I can't get the TAB-completion to work in ipython.el. I tried both,<br>
>> ipython.el delivered by the ipython-0.9b3-package and the current<br>
>> SVN-release.<br>
>> Starting ipython in emacs and inserting e.g. obj<TAB><br>
>> I get:<br>
>> In [2]: ...: obj<br>
>><br>
>> and the minibuffer says, that there is no completion for "obj" (what is<br>
>> obviously wrong).<br>
>> Pressing <TAB> once more i get.<br>
>> In [3]: ------------------------------------------------------------obj<br>
>><br>
>> I am using Emacs 22.2.1<br>
>><br>
>> Any suggestions?<br>
>><br>
>> Greets,<br>
>> ---[SNIP]---<br>
>><br>
>> I didn't get any answers. I didn't manage to contact the maintainer yet,<br>
>> but having this peace of software running smoothly would be a great thing.<br>
>><br>
>> What output do you get?<br>
>><br>
>> Greets,<br>
>> Thomas Bach.<br>
>><br>
>> _______________________________________________<br>
>> IPython-user mailing list<br>
>> <a href="mailto:IPython-user@scipy.org">IPython-user@scipy.org</a><br>
>> <a href="http://lists.ipython.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://lists.ipython.scipy.org/mailman/listinfo/ipython-user</a><br>
><br>
><br>
><br>
> --<br>
> Institut für Astronomie und Astrophysik<br>
> Eberhard Karls Universität Tübingen<br>
> Sand 1 - D-72076 Tübingen<br>
> <a href="mailto:schwarz@astro.uni-tuebingen.de">schwarz@astro.uni-tuebingen.de</a><br>
> <a href="mailto:stefan.schwarzburg@googlemail.com">stefan.schwarzburg@googlemail.com</a><br>
><br>
> Tel.: 07071/29-78605<br>
> -----------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> IPython-user mailing list<br>
> <a href="mailto:IPython-user@scipy.org">IPython-user@scipy.org</a><br>
> <a href="http://lists.ipython.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://lists.ipython.scipy.org/mailman/listinfo/ipython-user</a><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Institut für Astronomie und Astrophysik <br>Eberhard Karls Universität Tübingen<br>Sand 1 - D-72076 Tübingen<br><a href="mailto:schwarz@astro.uni-tuebingen.de">schwarz@astro.uni-tuebingen.de</a><br>
<a href="mailto:stefan.schwarzburg@googlemail.com">stefan.schwarzburg@googlemail.com</a><br><br>Tel.: 07071/29-78605<br>-----------------------------------------------------------------------<br>
</div>